MCPcopy Create free account
hub / github.com/kataras/iris / UseError

Method UseError

core/router/api_builder.go:1294–1296  ·  view source on GitHub ↗

UseError upserts one or more handlers that will be fired, as middleware, before any error handler registered through `On(Any)ErrorCode`. See `OnErrorCode` too.

(handlers ...context.Handler)

Source from the content-addressed store, hash-verified

1292// as middleware, before any error handler registered through `On(Any)ErrorCode`.
1293// See `OnErrorCode` too.
1294func (api *APIBuilder) UseError(handlers ...context.Handler) {
1295 api.middlewareErrorCode = context.UpsertHandlers(api.middlewareErrorCode, handlers)
1296}
1297
1298// Use appends Handler(s) to the current Party's routes and child routes.
1299// If the current Party is the root, then it registers the middleware to all child Parties' routes too.

Callers 3

RegisterViewMethod · 0.95
FallbackViewMethod · 0.95
LayoutMethod · 0.95

Calls 1

UpsertHandlersFunction · 0.92

Tested by

no test coverage detected