betty.exception module¶
Provide exception handling utilities.
- exception betty.exception.HumanFacingException¶
Bases:
Exception,LocalizableA localizable, human-facing exception.
When encountering an exception that extends this base class, Betty will show the localized exception message, and no stack trace.
- property indicators: Sequence[Indicator]¶
Get the human-readable indicators describing where the error occurred in the source data.
The first indicator is the innermost, and the last indicator is the outermost.
- localize(localizer: Localizer, /) LocalizedStr¶
Localize
selfto a human-readable string.
- betty.exception.do_raise(exception: BaseException, /) Never¶
Raise the given exception.
This is helpful as a callback.