MCPcopy Index your code
hub / github.com/ipython/ipython / structured_traceback

Method structured_traceback

IPython/core/ultratb.py:1254–1272  ·  view source on GitHub ↗
(
        self,
        etype: type,
        evalue: Optional[BaseException],
        etb: Optional[TracebackType] = None,
        tb_offset: Optional[int] = None,
        context: int = 5,
    )

Source from the content-addressed store, hash-verified

1252 print("\nKeyboardInterrupt")
1253
1254 def structured_traceback(
1255 self,
1256 etype: type,
1257 evalue: Optional[BaseException],
1258 etb: Optional[TracebackType] = None,
1259 tb_offset: Optional[int] = None,
1260 context: int = 5,
1261 ) -> list[str]:
1262 # tb: TracebackType or tupleof tb types ?
1263 if etype is None:
1264 etype, evalue, etb = sys.exc_info()
1265 if isinstance(etb, tuple):
1266 # tb is a tuple if this is a chained exception.
1267 self.tb = etb[0]
1268 else:
1269 self.tb = etb
1270 return FormattedTB.structured_traceback(
1271 self, etype, evalue, etb, tb_offset, context
1272 )
1273
1274
1275# ---------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 1

structured_tracebackMethod · 0.45

Tested by

no test coverage detected