mirror of
https://github.com/kataras/iris.git
synced 2026-01-09 13:05:56 +00:00
add a new _proposals folder and a silly idea
This commit is contained in:
@@ -3793,10 +3793,18 @@ type JSON struct {
|
||||
ErrorHandler ErrorHandler
|
||||
}
|
||||
|
||||
// ErrorHandler describes a context error handler. As for today this is only used
|
||||
// to globally or per-party or per-route handle JSON writes error.
|
||||
type ErrorHandler interface {
|
||||
HandleContextError(ctx *Context, err error)
|
||||
type (
|
||||
// ErrorHandler describes a context error handler. As for today this is only used
|
||||
// to globally or per-party or per-route handle JSON writes error.
|
||||
ErrorHandler interface {
|
||||
HandleContextError(ctx *Context, err error)
|
||||
}
|
||||
// ErrorHandlerFunc a function shortcut for ErrorHandler interface.
|
||||
ErrorHandlerFunc func(ctx *Context, err error)
|
||||
)
|
||||
|
||||
func (h ErrorHandlerFunc) HandleContextError(ctx *Context, err error) {
|
||||
h(ctx, err)
|
||||
}
|
||||
|
||||
// IsDefault reports whether this JSON options structure holds the default values.
|
||||
|
||||
Reference in New Issue
Block a user