aboutsummaryrefslogtreecommitdiffstats
path: root/modules/context/context.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2019-01-30 22:00:00 +0000
committertechknowlogick <matti@mdranta.net>2019-01-30 17:00:00 -0500
commitca00ca8ee450243b322457a0512ff338b6672494 (patch)
treec9ac742c5b86dc30e93d554bec21d244ba3e172f /modules/context/context.go
parent0f295ababacfefc217053a3093c520970bc72296 (diff)
downloadgitea-ca00ca8ee450243b322457a0512ff338b6672494.tar.gz
gitea-ca00ca8ee450243b322457a0512ff338b6672494.zip
Provide better panic handling (#5902)
This PR gitea'ises the macaron.Recovery() handler meaning that in the event of panic we get proper gitea 500 pages and the stacktrace is logged with the gitea logger. Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'modules/context/context.go')
-rw-r--r--modules/context/context.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/context/context.go b/modules/context/context.go
index 421d1d5f4f..0faa5c495c 100644
--- a/modules/context/context.go
+++ b/modules/context/context.go
@@ -136,7 +136,7 @@ func (ctx *Context) ServerError(title string, err error) {
}
ctx.Data["Title"] = "Internal Server Error"
- ctx.HTML(404, base.TplName("status/500"))
+ ctx.HTML(http.StatusInternalServerError, base.TplName("status/500"))
}
// NotFoundOrServerError use error check function to determine if the error