MCPcopy Create free account
hub / github.com/jetify-com/devbox / ShouldLogError

Function ShouldLogError

internal/boxcli/usererr/usererr.go:88–101  ·  view source on GitHub ↗

ShouldLogError returns true if the it's a combined error specifically marked to be logged or if it's not an ExitError.

(err error)

Source from the content-addressed store, hash-verified

86// ShouldLogError returns true if the it's a combined error specifically marked to be logged
87// or if it's not an ExitError.
88func ShouldLogError(err error) bool {
89 if err == nil {
90 return false
91 }
92 var userExecErr *ExitError
93 if errors.As(err, &userExecErr) {
94 return false
95 }
96 c := &combined{}
97 if errors.As(err, &c) {
98 return c.logged
99 }
100 return true
101}
102
103func IsWarning(err error) bool {
104 c := &combined{}

Callers 1

ErrorFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected