Skip to content

add option to traceback.format_exception_only to recurse into exception groups #105292

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

Closed
iritkatriel opened this issue Jun 4, 2023 · 0 comments · Fixed by #105294
Closed

add option to traceback.format_exception_only to recurse into exception groups #105292

iritkatriel opened this issue Jun 4, 2023 · 0 comments · Fixed by #105294
Labels
type-feature A feature request or enhancement

Comments

@iritkatriel
Copy link
Member

iritkatriel commented Jun 4, 2023

traceback.format_exception_only skips the backtrace and prints only the exception message. For exception groups it would be good to have an option to print the nested exceptions, recursively (just their types and message, no backtrace).

This is motivated by #104150.

Linked PRs

@iritkatriel iritkatriel added the type-feature A feature request or enhancement label Jun 4, 2023
iritkatriel added a commit to iritkatriel/cpython that referenced this issue Jun 4, 2023
…at_exception_only recurse into exception groups
ambv added a commit that referenced this issue Jun 6, 2023
…eption_only recurse into exception groups (#105294)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-feature A feature request or enhancement
Projects
None yet
1 participant