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

Method StopWithStatus

context/context.go:785–788  ·  view source on GitHub ↗

StopWithStatus stops the handlers chain and writes the "statusCode". If the status code is a failure one then it will also fire the specified error code handler.

(statusCode int)

Source from the content-addressed store, hash-verified

783// If the status code is a failure one then
784// it will also fire the specified error code handler.
785func (ctx *Context) StopWithStatus(statusCode int) {
786 ctx.StopExecution()
787 ctx.StatusCode(statusCode)
788}
789
790// StopWithText stops the handlers chain and writes the "statusCode"
791// among with a fmt-style text of "format" and optional arguments.

Callers 15

StopWithTextMethod · 0.95
StopWithErrorMethod · 0.95
StopWithPlainErrorMethod · 0.95
StopWithJSONMethod · 0.95
StopWithProblemMethod · 0.95
ViewMethod · 0.95
writeTokenFunction · 0.80
generateTokenFunction · 0.80
GetTodoFunction · 0.80
generateTokenFunction · 0.80
protectedFunction · 0.80
generateTokenPairFunction · 0.80

Calls 2

StopExecutionMethod · 0.95
StatusCodeMethod · 0.95

Tested by 2

authDependencyFunction · 0.64
TestRegisterRuleOverlapFunction · 0.64