Documentation ¶
Overview ¶
Package cerrors contains functions related to error handling.
The standard library's errors package is missing some functionality which we need, such as stack traces. To be certain that all errors created in Conduit are created with the additional information, usage of this package is mandatory.
At present, the package acts as a "thin forwarding layer", where we "mix and match" functions from different packages.
Package cerrors contains functions related to error handling.
The standard library's errors package is missing some functionality which we need, such as stack traces. To be certain that all errors created in Conduit are created with the additional information, usage of this package is mandatory.
At present, the package acts as a "thin forwarding layer", where we "mix and match" functions from different packages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // xerrors is used, since it provides the stack traces too New = xerrors.New //nolint:forbidigo // xerrors.New is allowed here, but not anywhere else Errorf = xerrors.Errorf //nolint:forbidigo,staticcheck // xerrors.Errorf is allowed here, but not anywhere else Is = errors.Is As = errors.As Unwrap = errors.Unwrap )
var ( // ErrNotImpl should be used when a functionality which is not yet implemented was called. ErrNotImpl = New("not impl") // ErrEmptyID should be used when an entity was requested, but the ID was not provided. ErrEmptyID = New("empty ID") )
Functions ¶
func GetStackTrace ¶
func GetStackTrace(err error) interface{}