Error Trace Rt¶
| Spice | |
|---|---|
ErrorTraceBuffer struct¶
Fixed-capacity backing store for one thread's error return trace. Always accessed through the thread-local instance __err_trace_buffer() hands back - never instantiated directly from Spice source.
Methods¶
reset¶
| Spice | |
|---|---|
Starts a fresh trace with the given location as its origin (frame 0).
Parameters
| Name | Type | Description |
|---|---|---|
originLoc |
string |
push¶
| Spice | |
|---|---|
Appends a propagation hop to the current trace. A no-op if no origin has been recorded yet. Once the capacity above is hit, further hops are silently dropped, keeping the origin and the earliest hops rather than the most recent ones - a real propagation chain this deep is expected to be exceedingly rare.
Parameters
| Name | Type | Description |
|---|---|---|
hopLoc |
string |
dump¶
| Spice | |
|---|---|
Prints every recorded frame. A no-op if there is no active trace.
Functions¶
_spice_errTraceReset¶
| Spice | |
|---|---|
Starts a fresh trace with the given location as its origin (frame 0).
Parameters
| Name | Type | Description |
|---|---|---|
originLoc |
string |
_spice_errTracePush¶
| Spice | |
|---|---|
Appends a propagation hop to the current trace.
Parameters
| Name | Type | Description |
|---|---|---|
hopLoc |
string |
_spice_errTraceDump¶
| Spice | |
|---|---|
Prints every recorded frame of the current thread's trace. A no-op if there is no active trace, which also covers the case where error return tracing was never enabled anywhere along the propagation chain in the first place - callers don't need to check that separately (see Error.dumpTrace() and panic()'s own wiring, both of which call this unconditionally).