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

Robustify error handling #426

Closed
eyalroz opened this issue Oct 9, 2022 · 0 comments
Closed

Robustify error handling #426

eyalroz opened this issue Oct 9, 2022 · 0 comments

Comments

@eyalroz
Copy link
Owner

eyalroz commented Oct 9, 2022

Let's make our error handling somewhat more robust:

  1. Be explicit about destructors which may throw; in C++11 there may be an implicit noexcept(true) - so let's say noexcept(false) where relevant.
  2. Don't say cuda::throw_if_error if we're already within namespace cuda.
  3. Use function attribute name in the error message also in NDEBUG mode (in kernel.hpp)
  4. Add an explicit description message when throwing an exception on failing to get/set stream synch policy or copying stream attributes
@eyalroz eyalroz self-assigned this Oct 9, 2022
eyalroz added a commit that referenced this issue Oct 9, 2022
1. Added `noexcept(false)` to relevant destructors
2. `cuda::throw_if_error()` `throw_if_error()` where relevant
3. Added exception descriptions to some throws
4. Also use attribute names for error reporting (rather than in debugging mode only)
eyalroz added a commit that referenced this issue Oct 10, 2022
* `cuda::throw_if_error()` `throw_if_error()` where relevant
* Added exception descriptions to some throws
* Also use attribute names for error reporting (rather than in debugging mode only)
eyalroz added a commit that referenced this issue Oct 10, 2022
1. Added `noexcept(false)` to relevant destructors
2. `cuda::throw_if_error()` `throw_if_error()` where relevant
3. Added exception descriptions to some throws
4. Also use attribute names for error reporting (rather than in debugging mode only)
eyalroz added a commit that referenced this issue Oct 10, 2022
1. Added `noexcept(false)` to relevant destructors
2. `cuda::throw_if_error()` `throw_if_error()` where relevant
3. Added exception descriptions to some throws
4. Also use attribute names for error reporting (rather than in debugging mode only)
eyalroz added a commit that referenced this issue Oct 13, 2022
* `cuda::throw_if_error()` `throw_if_error()` where relevant
* Added exception descriptions to some throws
* Also use attribute names for error reporting (rather than in debugging mode only)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant