1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 02:17:05 +00:00

add x/errors.RecoveryHandler

This commit is contained in:
Gerasimos (Makis) Maropoulos
2024-01-10 22:17:58 +02:00
parent 06a6e63dd9
commit b2c37e17b4
7 changed files with 55 additions and 41 deletions

View File

@@ -443,10 +443,10 @@ func (app *Application) GetContextPool() *context.Pool {
//
// type contextErrorHandler struct{}
// func (e *contextErrorHandler) HandleContextError(ctx iris.Context, err error) {
// errors.InvalidArgument.Err(ctx, err)
// errors.HandleError(ctx, err)
// }
// ...
// app.SetContextErrorHandler(new(contextErrorHandler))
// app.SetContextErrorHandler(new(contextErrorHandler))
func (app *Application) SetContextErrorHandler(errHandler context.ErrorHandler) *Application {
app.contextErrorHandler = errHandler
return app