MCPcopy Create free account
hub / github.com/kataras/iris / SetErrorHandler

Method SetErrorHandler

macro/macros.go:672–680  ·  view source on GitHub ↗

SetErrorHandler registers a common type path parameter error handler. The "fnHandler" MUST be a type of handler.ParamErrorHandler: func(ctx iris.Context, paramIndex int, err error). It calls the Macro.HandleError method for each of the "ms" entries.

(fnHandler interface{})

Source from the content-addressed store, hash-verified

670// func(ctx iris.Context, paramIndex int, err error). It calls
671// the Macro.HandleError method for each of the "ms" entries.
672func (ms *Macros) SetErrorHandler(fnHandler interface{}) {
673 for _, m := range *ms {
674 if m == nil {
675 continue
676 }
677
678 m.HandleError(fnHandler)
679 }
680}

Callers

nothing calls this directly

Calls 1

HandleErrorMethod · 0.65

Tested by

no test coverage detected