Error Context
Error context dataclass for bus listener failures.
BusErrorContext
dataclass
Bases: ErrorContext
Context passed to bus error handlers when a listener raises an exception.
Attributes:
| Name | Type | Description |
|---|---|---|
exception |
BaseException
|
The exception that was raised by the listener. Retains its
|
traceback |
str
|
Formatted traceback string. Always a non-empty string — the design explicitly requires always-populated tracebacks in the user-facing context, unlike the framework's own log suppression which may suppress them. |
topic |
str
|
The topic the listener was registered on. |
listener_name |
str
|
The name of the listener function that raised the exception. |
event |
Event[Any]
|
The event that was being processed when the exception occurred. |
Source code in src/hassette/bus/error_context.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | |