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:
4
iris.go
4
iris.go
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user