MCPcopy
hub / github.com/gin-gonic/gin / AbortWithError

Method AbortWithError

context.go:238–241  ·  view source on GitHub ↗

AbortWithError calls `AbortWithStatus()` and `Error()` internally. This method stops the chain, writes the status code and pushes the specified error to `c.Errors`. See Context.Error() for more details.

(code int, err error)

Source from the content-addressed store, hash-verified

236// This method stops the chain, writes the status code and pushes the specified error to `c.Errors`.
237// See Context.Error() for more details.
238func (c *Context) AbortWithError(code int, err error) *Error {
239 c.AbortWithStatus(code)
240 return c.Error(err)
241}
242
243/************************************/
244/********* ERROR MANAGEMENT *********/

Callers 6

BindUriMethod · 0.95
MustBindWithMethod · 0.95
NegotiateMethod · 0.95
TestErrorLoggerFunction · 0.80

Calls 2

AbortWithStatusMethod · 0.95
ErrorMethod · 0.95

Tested by 3

TestErrorLoggerFunction · 0.64