Skip to content

Commit c7f2b89

Browse files
4m1g0generalmimon
authored andcommitted
Extend user-defined exception from Exception instead of BaseException to follow Python oficial docummentation and make it possible to catch it using a generic Exception
1 parent 9d85560 commit c7f2b89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kaitaistruct.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ def resolve_enum(enum_obj, value):
409409
return value
410410

411411

412-
class KaitaiStructError(BaseException):
412+
class KaitaiStructError(Exception):
413413
"""Common ancestor for all error originating from Kaitai Struct usage.
414414
Stores KSY source path, pointing to an element supposedly guilty of
415415
an error.

0 commit comments

Comments
 (0)