datalad_next.exceptions.CapturedException
- class datalad_next.exceptions.CapturedException(exc, limit=None, capture_locals=False, level=8, logger=None)[source]
Bases:
object
This class represents information about an occurred exception (including its traceback), while not holding any references to the actual exception object or its traceback, frame references, etc.
Just keep the textual information for logging or whatever other kind of reporting.
- format_oneline_tb(limit=None, include_str=True)[source]
Format an exception traceback as a one-line summary
Returns a string of the form [filename:contextname:linenumber, ...]. If include_str is True (default), this is prepended with the string representation of the exception.
- format_short()[source]
Returns a short representation of the original exception
Form: ExceptionName(exception message)
- Return type:
str
- format_with_cause()[source]
Returns a representation of the original exception including the underlying causes
- property message
Returns only the message of the original exception
- Return type:
str
- property name
Returns the class name of the original exception
- Return type:
str