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

Method LogErr

x/errors/errors.go:362–370  ·  view source on GitHub ↗

LogErr sends the given "err" as message to the client and prints that error to using the "LogError" package-level function, which can be customized.

(ctx *context.Context, err error)

Source from the content-addressed store, hash-verified

360// LogErr sends the given "err" as message to the client and prints that
361// error to using the "LogError" package-level function, which can be customized.
362func (e ErrorCodeName) LogErr(ctx *context.Context, err error) {
363 if SkipCanceled && (ctx.IsCanceled() || context.IsErrCanceled(err)) {
364 return
365 }
366
367 LogError(ctx, err)
368
369 e.Message(ctx, "server error")
370}
371
372// HandleAPIError handles remote server errors.
373// Optionally, use it when you write your server's HTTP clients using the the /x/client package.

Callers 7

LogMethod · 0.95
insertFunction · 0.80
listFunction · 0.80
getByIDFunction · 0.80
RecoveryHandlerFunction · 0.80
HandleErrorFunction · 0.80
HandleAPIErrorFunction · 0.80

Calls 3

MessageMethod · 0.95
IsErrCanceledFunction · 0.92
IsCanceledMethod · 0.80

Tested by

no test coverage detected