mustash.exc
– Exception definitions¶
- exception mustash.exc.Error(message: str | None = None, /)¶
Bases:
Exception
An error has occurred in a Mustash function.
- Parameters:
message (str | None)
- Return type:
None
- add_note()¶
Exception.add_note(note) – add a note to the exception
- args¶
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception mustash.exc.DecodeError(message: str | None, /, *, line: int, column: int, offset: int)¶
Bases:
Error
,ValueError
A decode error has occurred in a string.
- line¶
- column¶
- offset¶
- add_note()¶
Exception.add_note(note) – add a note to the exception
- args¶
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception mustash.exc.DropException¶
Bases:
Error
A document should be dropped.
- Return type:
None
- add_note()¶
Exception.add_note(note) – add a note to the exception
- args¶
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception mustash.exc.PipelineFailureException(*, document: Document, processor: Processor, exception: Exception)¶
Bases:
Error
A pipeline has failed on a provided document.
This exception may be raised by
Pipeline.apply()
, to provide more context on the execution.- add_note()¶
Exception.add_note(note) – add a note to the exception
- args¶
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- document: Document¶
State of the document at exception time.