MCPcopy
hub / github.com/dropbox/godropbox / newBaseError

Function newBaseError

errors/errors.go:154–164  ·  view source on GitHub ↗

Internal helper function to create new baseError objects, note that if there is more than one level of redirection to call this function, stack frame information will include that level too.

(err error, msg string)

Source from the content-addressed store, hash-verified

152// note that if there is more than one level of redirection to call this function,
153// stack frame information will include that level too.
154func newBaseError(err error, msg string) *baseError {
155 var stackBuf [200]uintptr
156 stackLength := runtime.Callers(3, stackBuf[:])
157 stack := make([]uintptr, stackLength)
158 copy(stack, stackBuf[:stackLength])
159 return &baseError{
160 msg: msg,
161 stack: stack,
162 inner: err,
163 }
164}
165
166// Constructs full error message for a given DropboxError by traversing
167// all of its inner errors. If includeStack is True it will also include

Callers 4

NewFunction · 0.85
NewfFunction · 0.85
WrapFunction · 0.85
WrapfFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected