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

Add note instead of catching and raising unhashable exception #734

Merged
merged 4 commits into from
Mar 21, 2024

Conversation

tclose
Copy link
Contributor

@tclose tclose commented Mar 17, 2024

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)

Summary

This is minor change to stop catching specific exceptions and re-raising generic UnhashbleExceptions, in favour of adding a note to the original exception to aid debugging in an editor. Currently, when debugging in an editor, the execution breaks at the UnhashableException rather than the underlying cause of the exception.

The only change in functionality is that of the type of exception raised

Checklist

  • I have added tests to cover my changes (if necessary)
  • I have updated documentation (if necessary)

Copy link

codecov bot commented Mar 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.28%. Comparing base (811dc45) to head (317392c).
Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #734      +/-   ##
==========================================
+ Coverage   84.22%   84.28%   +0.05%     
==========================================
  Files          25       26       +1     
  Lines        5123     5128       +5     
  Branches     1449     1447       -2     
==========================================
+ Hits         4315     4322       +7     
+ Misses        802      800       -2     
  Partials        6        6              
Flag Coverage Δ
unittests 84.28% <100.00%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tclose tclose requested a review from effigies March 19, 2024 21:47
Copy link
Contributor

@effigies effigies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a shame that raise x from y disrupts debugging. That does seem like an appropriate way to add context.

@djarecka djarecka merged commit e284b65 into nipype:master Mar 21, 2024
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants