| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| and isinstance(self.value, BaseExceptionGroup) | ||
| and (subexc := _get_single_subexc(self.value)) is not None | ||
| ): | ||
| return f"[in {type(self.value).__name__}] {subexc!r}" |
There was a problem hiding this comment.
| return f"[in {type(self.value).__name__}] {subexc!r}" | |
| return f"{subexc!r} [single exception in {type(self.value).__name__}]" |
as discussed in the issue
Sorry, something went wrong.
There was a problem hiding this comment.
fixed, but noted my disagreement in the issue :)
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks @jakkdl!
I really appreciate your writeup in #12943 (comment), but continue to prefer this style for a few reasons:
I'm happy with this PR as-is since it seems to me like a clear improvement on the status quo; if nobody else has feedback I'll merge in a few days 🙂
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
fixes #12943
As ExceptionInfo still doesn't have proper support for exception groups this continues upon the hacky solution from #10209, modifying the reprcrash as well.
I find this solution ... incredibly hacky and ugly, and am not a fan that n==1 gets handled but not n==2. But conceptually it just gets really tricky to figure out what info to strip, and how to show that. If we're going with stripping structure & group messages we could extend this solution to something like [in ExceptionGroup]: ValueError("foo"), TypeError("bar").
EDIT: less hacky now that I moved the code to ExceptionInfo.exconly