pub struct Exception {
pub ty: Annotated<String>,
pub value: Annotated<JsonLenientString>,
pub module: Annotated<String>,
pub stacktrace: Annotated<Stacktrace>,
pub raw_stacktrace: Annotated<RawStacktrace>,
pub thread_id: Annotated<ThreadId>,
pub mechanism: Annotated<Mechanism>,
pub other: Object<Value>,
}
Expand description
A single exception.
Multiple values inside of an event represent chained exceptions and should be sorted oldest to newest. For example, consider this Python code snippet:
try:
raise Exception("random boring invariant was not met!")
except Exception as e:
raise ValueError("something went wrong, help!") from e
Exception
would be described first in the values list, followed by a description of ValueError
:
{
"exception": {
"values": [
{"type": "Exception": "value": "random boring invariant was not met!"},
{"type": "ValueError", "value": "something went wrong, help!"},
]
}
}
Fields§
§ty: Annotated<String>
Exception type, e.g. ValueError
.
At least one of type
or value
is required, otherwise the exception is discarded.
value: Annotated<JsonLenientString>
Human readable display value.
At least one of type
or value
is required, otherwise the exception is discarded.
module: Annotated<String>
The optional module, or package which the exception type lives in.
stacktrace: Annotated<Stacktrace>
Stack trace containing frames of this exception.
raw_stacktrace: Annotated<RawStacktrace>
Optional unprocessed stack trace.
thread_id: Annotated<ThreadId>
An optional value that refers to a thread.
mechanism: Annotated<Mechanism>
Mechanism by which this exception was generated and handled.
other: Object<Value>
Additional arbitrary fields for forwards compatibility.