.. _jgdv.debugging.traceback_factory: ================================ jgdv.debugging.traceback_factory ================================ .. py:module:: jgdv.debugging.traceback_factory Classes ------- .. autoapisummary:: jgdv.debugging.traceback_factory.TracebackFactory Module Contents =============== .. _jgdv.debugging.traceback_factory.TracebackFactory: .. py:class:: TracebackFactory(*, chop_self = True) 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[:]) .. py:method:: _get_frames() -> from https://stackoverflow.com/questions/27138440 Builds the frame stack from most recent to least, .. py:method:: to_tb(frames = None) -> .. py:attribute:: frames :type: list[jgdv.Frame] :value: []