MCPcopy Index your code
hub / github.com/cortexlabs/cortex / CastRecoverError

Function CastRecoverError

pkg/lib/errors/error.go:187–198  ·  view source on GitHub ↗
(errInterface interface{}, strs ...string)

Source from the content-addressed store, hash-verified

185}
186
187func CastRecoverError(errInterface interface{}, strs ...string) error {
188 var err error
189 var ok bool
190 err, ok = errInterface.(error)
191 if !ok {
192 err = &Error{
193 Kind: ErrNotCortexError,
194 Message: fmt.Sprint(errInterface),
195 }
196 }
197 return Wrap(err, strs...)
198}
199
200func removeEmptyStrs(strs []string) []string {
201 var cleanStrs []string

Callers 6

RecoverAndExitFunction · 0.92
RecovererFunction · 0.92
RunFunction · 0.92
RunWithPanicHandlerFunction · 0.92
recoverAndRespondFunction · 0.92
RunWithPanicHandlerFunction · 0.92

Calls 1

WrapFunction · 0.85

Tested by

no test coverage detected