Ensure that template compilation panics are sent to the logs #16788

Merged
lunny merged 1 commits from wrap-template-panic into main 2021-08-23 19:40:59 +00:00
Contributor

Although panics within the rendering pipeline are caught and dealt with,
panics that occur before that starts are unprotected and will kill Gitea
without being sent to the logs.

This PR adds a basic recovery handler to catch panics that occur after
the logger is initialised and ensure that they're sent to the logger.

Related #16784

Signed-off-by: Andrew Thornton art27@cantab.net

Although panics within the rendering pipeline are caught and dealt with, panics that occur before that starts are unprotected and will kill Gitea without being sent to the logs. This PR adds a basic recovery handler to catch panics that occur after the logger is initialised and ensure that they're sent to the logger. Related #16784 Signed-off-by: Andrew Thornton <art27@cantab.net>
jolheiser reviewed 2021-08-23 18:22:30 +00:00
Contributor
```suggestion ```
zeripath reviewed 2021-08-23 19:03:33 +00:00
Author
Contributor

d'oh!!

d'oh!!
jolheiser approved these changes 2021-08-23 19:10:54 +00:00
techknowlogick approved these changes 2021-08-23 19:32:00 +00:00
This repo is archived. You cannot comment on pull requests.
No reviewers
No Milestone
No project
No Assignees
3 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: lunny/gitea#16788
No description provided.