Documentation
¶
Overview ¶
Package deeperr is a lightweight Go error-wrapping library designed to provide stack traces and error codes
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
Contains checks the entire chain and returns true if ANY deeperr.Error in the hierarchy matches the error code
func GetStacktrace ¶
GetStacktrace traverses the error chain and constructs a formatted string, representing the full execution path. for each error in the chain, it prints the error message and if the error is a deeperr.Error it will also print the location where the error was created.
func PrintStacktrace ¶
func PrintStacktrace(err error)
PrintStacktrace is a helper function that retrieves the full stack trace of an error and writes it directly to standard error (os.Stderr).
Types ¶
type Code ¶
type Code int
Code represents an error code
const CodeUnset Code = -1
CodeUnset means this error doesn't use a code