1
0
mirror of https://github.com/astaxie/beego.git synced 2025-06-12 08:30:40 +00:00

add error test

This commit is contained in:
JessonChan
2016-03-22 18:27:29 +08:00
parent 0859ec570c
commit b2098266a3
2 changed files with 74 additions and 0 deletions

View File

@ -77,6 +77,7 @@ func (ctx *Context) Redirect(status int, localurl string) {
// Abort stops this request.
// if beego.ErrorMaps exists, panic body.
func (ctx *Context) Abort(status int, body string) {
ctx.Output.SetStatus(status)
panic(body)
}