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

Function exit

cmd/async-gateway/main.go:122–136  ·  view source on GitHub ↗
(log *zap.SugaredLogger, err error, wrapStrs ...string)

Source from the content-addressed store, hash-verified

120}
121
122func exit(log *zap.SugaredLogger, err error, wrapStrs ...string) {
123 if err == nil {
124 os.Exit(0)
125 }
126
127 for _, str := range wrapStrs {
128 err = errors.Wrap(err, str)
129 }
130
131 telemetry.Error(err)
132 if !errors.IsNoPrint(err) {
133 log.Fatal(err)
134 }
135 os.Exit(1)
136}

Callers 1

mainFunction · 0.70

Calls 3

WrapFunction · 0.92
ErrorFunction · 0.92
IsNoPrintFunction · 0.92

Tested by

no test coverage detected