Documentation
¶
Overview ¶
Package errors provides utilities for error handling with stack traces.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsError ¶
IsError returns true if actual is the same type of error as expected. This method unwraps the given error objects (if they are wrapped in objects with a stacktrace) and then does a simple equality check on them.
func PrintErrorWithStackTrace ¶
PrintErrorWithStackTrace converts the given error to a string, including the stack trace if available
func Unwrap ¶
Unwrap unwraps the given error if it is a wrapper that contains a stacktrace and returns the original, underlying error. In all other cases, return the error unchanged
func WithStackTrace ¶
WithStackTrace wraps the given error in an Error type that contains the stack trace. If the given error already has a stack trace, it is used directly. If the given error is nil, return nil.
func WithStackTraceAndPrefix ¶
WithStackTraceAndPrefix wraps the given error in an Error type that contains the stack trace and has the given message prepended as part of the error message. If the given error already has a stack trace, it is used directly. If the given error is nil, return nil.
Types ¶
This section is empty.