MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / Cause

Function Cause

pkg/errors/causes.go:72–77  ·  view source on GitHub ↗

Cause returns the cause of the given error, if any.

(err error)

Source from the content-addressed store, hash-verified

70
71// Cause returns the cause of the given error, if any.
72func Cause(err error) error {
73 if causeErr := (causer)(nil); errors.As(err, &causeErr) {
74 return causeErr.Cause()
75 }
76 return nil
77}
78
79// RootCause walks up the "error chain" until it finds the root cause of an error.
80func RootCause(err error) error {

Callers 4

FrontendFunction · 0.92
RootCauseFunction · 0.85
StackFunction · 0.85
FieldsMethod · 0.85

Calls 2

CauseMethod · 0.65
AsMethod · 0.45

Tested by

no test coverage detected