MCPcopy Create free account
hub / github.com/baidu/EasyFaaS / HandleError

Function HandleError

pkg/util/runtime/runtime.go:101–110  ·  view source on GitHub ↗

HandlerError is a method to invoke when a non-user facing piece of code cannot return an error and needs to indicate it has been ignored. Invoking this method is preferable to logging the error - the default behavior is to log but the errors may be sent to a remote server for analysis.

(err error)

Source from the content-addressed store, hash-verified

99// is preferable to logging the error - the default behavior is to log but the
100// errors may be sent to a remote server for analysis.
101func HandleError(err error) {
102 // this is sometimes called with a nil error. We probably shouldn't fail and should do nothing instead
103 if err == nil {
104 return
105 }
106
107 for _, fn := range ErrorHandlers {
108 fn(err)
109 }
110}
111
112// logError prints an error with the call stack of the location it was reported
113func logError(err error) {

Callers 1

TestCustomHandleErrorFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestCustomHandleErrorFunction · 0.68