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

Function Error

pkg/lib/exit/exit.go:31–47  ·  view source on GitHub ↗
(err error, wrapStrs ...string)

Source from the content-addressed store, hash-verified

29}
30
31func Error(err error, wrapStrs ...string) {
32 for _, str := range wrapStrs {
33 err = errors.Wrap(err, str)
34 }
35
36 if err != nil && !errors.IsNoTelemetry(err) {
37 telemetry.Error(err)
38 }
39
40 if err != nil && !errors.IsNoPrint(err) {
41 errors.PrintErrorForUser(err)
42 }
43
44 telemetry.Close()
45
46 os.Exit(1)
47}
48
49func Panic(err error, wrapStrs ...string) {
50 for _, str := range wrapStrs {

Callers 15

PromptFunction · 0.92
YesOrExitFunction · 0.92
MustDockerClientFunction · 0.92
RunWithPanicHandlerFunction · 0.92
logs.goFile · 0.92
env.goFile · 0.92
promptForExistingEnvNameFunction · 0.92
MustGetOperatorConfigFunction · 0.92
runManagerFunction · 0.92
refresh.goFile · 0.92
completion.goFile · 0.92
delete.goFile · 0.92

Calls 6

WrapFunction · 0.92
IsNoTelemetryFunction · 0.92
ErrorFunction · 0.92
IsNoPrintFunction · 0.92
PrintErrorForUserFunction · 0.92
CloseFunction · 0.92

Tested by

no test coverage detected