code refactor

This commit is contained in:
MaysWind
2024-08-19 00:31:32 +08:00
parent 6fcb0a2b3c
commit e86d4e05ce
73 changed files with 1404 additions and 1344 deletions
+2 -2
View File
@@ -20,12 +20,12 @@ var (
)
// Recovery logs error message when error occurs
func Recovery(c *core.Context) {
func Recovery(c *core.WebContext) {
defer func() {
if err := recover(); err != nil {
stack := stack(3)
log.ErrorfWithRequestIdAndExtra(c, string(stack), "System Error! because %s", err)
log.ErrorfWithExtra(c, string(stack), "System Error! because %s", err)
utils.PrintJsonErrorResult(c, errs.ErrSystemError)
}
}()