MCPcopy Create free account
hub / github.com/juju/errors / newLocationError

Function newLocationError

error.go:58–62  ·  view source on GitHub ↗

newLocationError constructs a new Locationer error from the supplied error with the location set to callDepth in the stack. If a nill error is provided to this function then a new empty error is constructed.

(err error, callDepth int)

Source from the content-addressed store, hash-verified

56// with the location set to callDepth in the stack. If a nill error is provided
57// to this function then a new empty error is constructed.
58func newLocationError(err error, callDepth int) *locationError {
59 le := &locationError{error: err}
60 le.function, le.line = getLocation(callDepth + 1)
61 return le
62}
63
64// Error implementes the error interface.
65func (l *locationError) Error() string {

Callers 15

SetLocationFunction · 0.85
TimeoutfFunction · 0.85
NewTimeoutFunction · 0.85
NotFoundfFunction · 0.85
NewNotFoundFunction · 0.85
UserNotFoundfFunction · 0.85
NewUserNotFoundFunction · 0.85
UnauthorizedfFunction · 0.85
NewUnauthorizedFunction · 0.85
NotImplementedfFunction · 0.85
NewNotImplementedFunction · 0.85
AlreadyExistsfFunction · 0.85

Calls 1

getLocationFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…