Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Indices ¶
Indices examines a stack to see if it includes a panic. Thread-safe
- isPanic is true if the stack includes a panic
- stack[recoveryIndex] is the code line of the deferred function containing recovery() invocation
- stack[panicIndex] is the code line causing the panic located in the function deferring or any code that function invokes
- for panic detection to work, the code line of defer() invocation must be included in stack
- note: the location in the deferring function is returned as the last line of the deferring function
- pruntime.Stack is the parsed output of runtime.Stack
func PanicDetectorValues ¶
func PanicDetectorValues() (deferS, panicS string)
PanicDetectorValues is used by [whynotpanic.WhyNotPanic] to explain panic detection
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.