mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
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>
This commit is contained in:
@@ -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>
|
||||
|
Reference in New Issue
Block a user