MCPcopy
hub / github.com/cortexlabs/cortex / CauseOrSelf

Function CauseOrSelf

pkg/lib/errors/error.go:157–165  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

155}
156
157func CauseOrSelf(err error) error {
158 if cortexError, ok := err.(*Error); ok {
159 cause := cortexError.Cause
160 if cause != nil {
161 return cause
162 }
163 }
164 return err
165}
166
167func PrintStacktrace(err error) {
168 fmt.Printf("%+v\n", err)

Callers 6

enqueueS3FileContentsMethod · 0.92
EventFromExceptionFunction · 0.92
IsAdminMethod · 0.92
IsAWSErrorFunction · 0.92
IsErrCodeFunction · 0.92
MessageFirstLineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected