- Notifications
You must be signed in to change notification settings - Fork3.5k
Filesystem Guide
Alon Zakai edited this pageAug 29, 2014 ·30 revisions
This article has moved from the wiki to the new site:topic here.
Pleaseupdate your bookmarks to the new site as this post will be deleted soon.
class MyGroup(ExceptionGroup):def derive(self, excs):return MyGroup(self.message, excs)
e = MyGroup("eg", [ValueError(1), TypeError(2)])e.add_note("a note")e.context = Exception("context")e.cause = Exception("cause")try:raise eexcept Exception as e:exc = e
match, rest = exc.split(ValueError)exc, exc.context, exc.cause, exc.notes
match, match.context, match.cause, match.notes
rest, rest.context, rest.cause, rest.notes
exc.traceback is match.traceback is rest.traceback