1
0
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:
Gerasimos (Makis) Maropoulos
2021-02-15 11:30:29 +02:00
parent 5990e7f432
commit e901575ca8
5 changed files with 19 additions and 12 deletions

View File

@@ -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.