jgdv.debugging.traceback_factory
Classes
A Helper to simplify access to tracebacks. |
Module Contents
- class jgdv.debugging.traceback_factory.TracebackFactory(*, chop_self=True)[source]
A Helper to simplify access to tracebacks. By Default, removes the frames of this tracebuilder from the trace ie : TraceBuilder._get_frames() -> TraceBuilder.__init__() -> call -> call -> root will be: call -> call -> root
use item acccess to limit the frames, eg: tb[2:], will remove the two most recent frames from the traceback
Use as: tb = TraceBuilder() raise Exception().with_traceback(tb[:])
- Parameters:
chop_self (bool)
- _get_frames() <Unknown>[source]
from https://stackoverflow.com/questions/27138440 Builds the frame stack from most recent to least,
- Return type:
None