-
Notifications
You must be signed in to change notification settings - Fork 51
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
Raise a custom JobFailure
error when a job fails
#2410
Conversation
JobFailure
error when a job failsJobFailure
error when a job fails
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2410 +/- ##
=======================================
Coverage 98.45% 98.45%
=======================================
Files 84 84
Lines 3423 3429 +6
=======================================
+ Hits 3370 3376 +6
Misses 53 53 ☔ View full report in Codecov by Sentry. |
This is ready for review now. |
Looks good! I can't think of anything else to include in the raise, imo the directory is the most important part. |
I can't think of any issues with this approach so will merge this. I'm going to keep tabs on it just in case something unexpected comes up, but I think it's fine. The parent error is still accessible by the user, which is the important part. |
Summary of Changes
This PR seeks to close #2407 by raising a custom
JobFailure
exception when a job fails, which can be used totry
/except
calculations more easily. TheJobFailure
raises the parent ASE error but also has adirectory
attribute that can be easily accessed by the user without any need to sift through the log file. The directory info was already being logged, but now it's also present in the traceback. There is also aparent_error
attribute to ensure the original exception is still accessible by the end user.Pinging @tomdemeyere for review.
Requirements
main
).Note: If you are an external contributor, you will see a comment from @buildbot-princeton. This is solely for the maintainers.