mirror of
https://github.com/kataras/iris.git
synced 2025-12-20 03:17:04 +00:00
Path type parameter error handler: add the parameter index in the input arguments
see previous commit
This commit is contained in:
@@ -315,7 +315,7 @@ func (m *Macro) Trailing() bool {
|
||||
|
||||
// HandleError registers a handler which will be executed
|
||||
// when a parameter evaluator returns false and a non nil value which is a type of `error`.
|
||||
// The "fnHandler" value MUST BE a type of `func(iris.Context, err error)`,
|
||||
// The "fnHandler" value MUST BE a type of `func(iris.Context, paramIndex int, err error)`,
|
||||
// otherwise the program will receive a panic before server startup.
|
||||
// The status code of the ErrCode (`else` literal) is set
|
||||
// before the error handler but it can be modified inside the handler itself.
|
||||
|
||||
Reference in New Issue
Block a user