Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StackTracer ¶
StackTracer defines a common interface for extracting stack information. Sentry and several other packages use this interface.
func WithStackTrace ¶
func WithStackTrace(err error, skipFrames int) (StackTracer, error)
WithStackTrace ensures that an error has a stack trace, and pairs it with a StackTracer.
It checks if the given error implements StackTracer and returns it if it does. Otherwise, it will wrap the error in an error type that implements StackTracer and returns both.
If nil is passed then nil is returned.
Click to show internal directories.
Click to hide internal directories.