Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve exception handling #591

Open
kingcrimsontianyu opened this issue Jan 22, 2025 · 0 comments
Open

Improve exception handling #591

kingcrimsontianyu opened this issue Jan 22, 2025 · 0 comments
Assignees
Labels
c++ Affects the C++ API of KvikIO improvement Improves an existing functionality

Comments

@kingcrimsontianyu
Copy link
Contributor

Improve source

For functions with the noexcept specifier, we need to find and fix the cases where an exception can potentially reach the outer scope without a proper catch. Such cases break the promise of noexcept and will cause std::terminate() to be called when an exception does happen.

For instance, currently:

AllocRetain::Alloc::~Alloc() noexcept { _manager->put(_alloc, _size); }

is marked noexcept, but the put method is potentially throwing.

Improve documentation

For all potentially throwing functions (those without the noexcept or noexcept(true) specifier), we need to document (by adding the Doxygen section @throw/@throws/@exception) the exceptions that may be directly thrown from them (i.e. as a result of the throw expression instead of the calls to other potentially throwing functions).

@kingcrimsontianyu kingcrimsontianyu added improvement Improves an existing functionality c++ Affects the C++ API of KvikIO labels Jan 22, 2025
@kingcrimsontianyu kingcrimsontianyu self-assigned this Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Affects the C++ API of KvikIO improvement Improves an existing functionality
Projects
None yet
Development

No branches or pull requests

1 participant