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

Merged
lunny merged 2 commits from backport-16788-v1.15 into release/v1.15 2021-08-23 23:50:04 +00:00
Contributor

Backport #16788

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.

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

Backport #16788 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. Signed-off-by: Andrew Thornton <art27@cantab.net>
jolheiser approved these changes 2021-08-23 19:26:55 +00:00
techknowlogick approved these changes 2021-08-23 23:45:22 +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#16792
No description provided.