Documentation
¶
Overview ¶
Package traceback ports cpython/Python/traceback.c. v0.3 ships the data shape, the format/print entry points, and a minimal frameless builder used by the errors package to attach traceback rows from Go call sites. Real frames join in v0.6 once the VM lands.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Format ¶
Format returns the multi-line traceback string, oldest entry first. Mirrors traceback.format_tb output.
CPython: Python/traceback.c:L985 _PyTraceBack_FromFrame
func FormatException ¶
FormatException prepends typeName: message to a Format(tb) output, matching `traceback.format_exception` for a single (no-chain) exception. The errors package walks the cause/context chain itself and calls FormatException per node.
CPython: Python/traceback.c:L1129 _PyTraceBack_Print
Types ¶
type Entry ¶
Entry is one line of a traceback. Mirrors the data carried by PyTracebackObject (filename, line number, function name).
CPython: Objects/frameobject.h (analog) and Python/traceback.c
type Traceback ¶
Traceback is the linked list of entries that backs Python's `__traceback__`. The next pointer chains older frames; CPython stores the chain in reverse, with the newest frame at the head.
CPython: Include/cpython/traceback.h:L9 PyTracebackObject