Let CLI report on exception causes#7210
Conversation
Codecov ReportBase: 88.90% // Head: 90.47% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## maint #7210 +/- ##
==========================================
+ Coverage 88.90% 90.47% +1.57%
==========================================
Files 355 355
Lines 46686 46676 -10
Branches 6352 6352
==========================================
+ Hits 41506 42230 +724
+ Misses 5165 4431 -734
Partials 15 15
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Ensure the already existing `format_exception_with_cause` also works with `traceback.TracebackException` and use this to provide another format method for `CapturedException`. This is then used with unexpectedly bubbled up exceptions by the CLI. Fixes datalad#7163
|
no objections, although would have been nice to see in comparison to how it would look now, but I would just assume that now it would just not say that exception was caused by another exception. so, as such, providing information about chain would might come useful (although without traceback/location information -- of limited immediate use). |
Yes, w/o the PR causes are not reported. |
|
PR released in |
Ensure the already existing
format_exception_with_causealso works withtraceback.TracebackExceptionand use this to provide another format method forCapturedException. This is then used with unexpectedly bubbled up exceptions by the CLI.Fixes #7163
FTR:
Actually hard to find a case where I know an exception would bubble up and actually have a
__cause__in core.Making one up like this:
Would now be:
Whereas
Would lead to
Rational for sparing the class name when there's a message, is taken from the existing implementation used by special remotes: