bundles / IPython 9.12.0 / IPython / core / ultratb / ListTB / structured_traceback
function
IPython.core.ultratb:ListTB.structured_traceback
source: /IPython/core/ultratb.py :151
Signature
def structured_traceback ( self , etype : type , evalue : Optional[BaseException] , etb : Optional[TracebackType] = None , tb_offset : Optional[int] = None , context : int = 5 ) → list[str] Summary
Return a color formatted string with the traceback info.
Parameters
etype: exception typeType of the exception raised.
evalue: objectData stored in the exception
etb: list | TracebackType | NoneIf list: List of frames, see class docstring for details. If Traceback: Traceback of the exception.
tb_offset: int, optionalNumber of frames in the traceback to skip. If not given, the instance evalue is used (set in constructor).
context: int, optionalNumber of lines of context information to print.
Returns
: String with formatted exception.
Aliases
-
IPython.core.ultratb.ListTB.structured_traceback