Expand description
Rich exception tracebacks with source code, locals, frame suppression, panic hook.
Traceback – exception traceback rendering. Equivalent to Rich’s traceback.py.
Provides data structures for representing tracebacks and a Traceback
renderable that displays them with Rich formatting, complete with source
code context, local variable tables, and styled box-drawn borders.
§Theme keys used
| Key | Style |
|---|---|
traceback.border | border of the outer and inner boxes |
traceback.title | “Traceback (most recent call last)” title |
traceback.error | exception type name |
traceback.error_mark | the “❱” marker on the error line |
traceback.filename | file paths in frame headers |
traceback.line_no | line numbers in source context |
traceback.locals_header | header of the locals sub-table |
Structs§
- Frame
- A single frame in a traceback.
- Stack
- A stack of frames (one exception level).
- Trace
- Full trace data.
- Traceback
- Renders a traceback with Rich formatting.
Functions§
- install
- Install a panic hook that renders Rich-formatted tracebacks to stderr.