diff options
author | zeripath <art27@cantab.net> | 2019-01-30 22:00:00 +0000 |
---|---|---|
committer | techknowlogick <matti@mdranta.net> | 2019-01-30 17:00:00 -0500 |
commit | ca00ca8ee450243b322457a0512ff338b6672494 (patch) | |
tree | c9ac742c5b86dc30e93d554bec21d244ba3e172f /templates | |
parent | 0f295ababacfefc217053a3093c520970bc72296 (diff) | |
download | gitea-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 'templates')
-rw-r--r-- | templates/status/500.tmpl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/templates/status/500.tmpl b/templates/status/500.tmpl index 6dfc1d7ace..2e01e8ac74 100644 --- a/templates/status/500.tmpl +++ b/templates/status/500.tmpl @@ -3,7 +3,8 @@ <p style="margin-top: 100px"><img src="{{AppSubUrl}}/img/500.png" alt="500"/></p> <div class="ui divider"></div> <br> - {{if .ErrorMsg}}<p>An error has occurred : {{.ErrorMsg}}</p>{{end}} + {{if .ErrorMsg}}<p>An error has occurred :</p> + <pre style="text-align: left">{{.ErrorMsg}}</pre>{{end}} {{if .ShowFooterVersion}}<p>Application Version: {{AppVer}}</p>{{end}} {{if .IsAdmin}}<p>If you are sure this is Gitea bug, please search for issue on <a href="https://github.com/go-gitea/gitea/issues">GitHub</a> and open new issue if necessary.</p>{{end}} </div> |