You are viewing an older version (9.3.0). Go to latest (9.13.0)
{ } Raw JSON

bundles / IPython 9.3.0 / IPython / core / ultratb / ListTB / structured_traceback

function

IPython.core.ultratb:ListTB.structured_traceback

source: /IPython/core/ultratb.py :150

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 type

Type of the exception raised.

evalue : object

Data stored in the exception

etb : list | TracebackType | None

If list: List of frames, see class docstring for details. If Traceback: Traceback of the exception.

tb_offset : int, optional

Number of frames in the traceback to skip. If not given, the instance evalue is used (set in constructor).

context : int, optional

Number of lines of context information to print.

Returns

: String with formatted exception.

Aliases

  • IPython.core.ultratb.ListTB.structured_traceback