-
Notifications
You must be signed in to change notification settings - Fork 11
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
Better stacktraces in ioda #14
Better stacktraces in ioda #14
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this! I think the code looks good, just have the comments about the commented code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for removing the commented code!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this looks very useful!
Now that this PR has two approvals, I'll bring it over to JCSDA-internal for final review and merging. |
PR is https://github.com/JCSDA-internal/ioda/pull/1224 - I will close this PR once https://github.com/JCSDA-internal/ioda/pull/1224 is merged. |
* Better stacktraces in ioda * Apply suggestions from code review * Trigger CI --------- Co-authored-by: Ryan Honeyager <[email protected]>
Replaced by https://github.com/JCSDA-internal/ioda/pull/1224 |
Description
Here's a natural follow-on to my oops PR (JCSDA/oops#24). It inserts stack traces into the ioda-engines exceptions. These traces are immensely useful when debugging ObsSpace issues. Instead of receiving vague errors about ioda being unable to read a variable, if you're lucky (i.e. you have the right build flags and operating system / libstdc++ / libbacktrace / addr2line support) you now can see a list of stack frames with line numbers showing exactly where errors are occurring.
Here's what I mean:
I've also added in some binding functions to bring hdf5's exceptions into
std::exception
. See thehdf5_error_check()
function. On any hdf5 failure, this call will read the hdf5 exception stack and re-throw it as a series of nested C++ exceptions. Implementing this throughout ioda would need many small one-line changes, and that would be a bit tedious to review, so it's best done in a separate PR.Dependencies
List the other PRs that this PR is dependent on:
Impact
Better error messages are their own reward. Downstream developers will
Checklist