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{})
| 670 | // func(ctx iris.Context, paramIndex int, err error). It calls |
| 671 | // the Macro.HandleError method for each of the "ms" entries. |
| 672 | func (ms *Macros) SetErrorHandler(fnHandler interface{}) { |
| 673 | for _, m := range *ms { |
| 674 | if m == nil { |
| 675 | continue |
| 676 | } |
| 677 | |
| 678 | m.HandleError(fnHandler) |
| 679 | } |
| 680 | } |
nothing calls this directly
no test coverage detected