mirror of
https://github.com/kataras/iris.git
synced 2026-01-09 13:05:56 +00:00
replace all common error responses with the new Context.StopWithError
Former-commit-id: 99b08a0b5564ef640456db12674cb37721f73ae3
This commit is contained in:
@@ -1576,8 +1576,8 @@ func (ctx *context) StopWithStatus(statusCode int) {
|
||||
// If the status code is a failure one then
|
||||
// it will also fire the specified error code handler.
|
||||
func (ctx *context) StopWithText(statusCode int, plainText string) {
|
||||
ctx.WriteString(plainText)
|
||||
ctx.StopWithStatus(statusCode)
|
||||
ctx.WriteString(plainText)
|
||||
}
|
||||
|
||||
// StopWithError stops the handlers chain and writes the "statusCode"
|
||||
|
||||
Reference in New Issue
Block a user