tech: dont print error message on 500 page

closes #10828
This commit is contained in:
bergquist 2018-02-14 16:39:05 +01:00
parent 47e363ea15
commit 842f4c1d32

View File

@ -115,11 +115,11 @@ func Recovery() macaron.Handler {
c.Data["Title"] = "Server Error"
c.Data["AppSubUrl"] = setting.AppSubUrl
if theErr, ok := err.(error); ok {
c.Data["Title"] = theErr.Error()
}
if setting.Env == setting.DEV {
if theErr, ok := err.(error); ok {
c.Data["Title"] = theErr.Error()
}
c.Data["ErrorMsg"] = string(stack)
}