fall back to native when handeling to exception groups

This commit is contained in:
Cheukting 2022-06-23 11:33:10 +08:00
parent fab696dcd1
commit 352db28428
1 changed files with 6 additions and 1 deletions

View File

@ -923,7 +923,12 @@ class FormattedExcinfo:
seen: Set[int] = set()
while e is not None and id(e) not in seen:
seen.add(id(e))
if excinfo_:
if isinstance(e, ExceptionGroup):
reprtraceback = ReprTracebackNative(
traceback.format_exception(type(e), e, excinfo.traceback[0]._rawentry)
)
reprcrash = None
elif excinfo_:
reprtraceback = self.repr_traceback(excinfo_)
reprcrash: Optional[ReprFileLocation] = (
excinfo_._getreprcrash() if self.style != "value" else None