aboutsummaryrefslogtreecommitdiffstats
path: root/modules/context
diff options
context:
space:
mode:
Diffstat (limited to 'modules/context')
-rw-r--r--modules/context/context.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/context/context.go b/modules/context/context.go
index bc48c1415d..ea267dfb3f 100644
--- a/modules/context/context.go
+++ b/modules/context/context.go
@@ -188,6 +188,10 @@ func (ctx *Context) HTML(status int, name base.TplName) {
return fmt.Sprint(time.Since(startTime).Nanoseconds()/1e6) + "ms"
}
if err := ctx.Render.HTML(ctx.Resp, status, string(name), ctx.Data); err != nil {
+ if status == http.StatusInternalServerError && name == base.TplName("status/500") {
+ ctx.PlainText(http.StatusInternalServerError, []byte("Unable to find status/500 template"))
+ return
+ }
ctx.ServerError("Render failed", err)
}
}