Refactor error system (#33771)

It should not expose `util.SilentWrap` or construct it manually.
This commit is contained in:
wxiaoguang authored and GitHub committed 2025-03-03 05:36:10 +00:00
1 parent dbed39d632
commit 216243eee2
12 files changed
+41 -58

No files matched your search

+1 -1
View File
@@ -789,7 +789,7 @@ func Run(ctx *context_module.Context) {
return nil
})
if err != nil {
if errLocale := util.ErrAsLocale(err); errLocale != nil {
if errLocale := util.ErrorAsLocale(err); errLocale != nil {
ctx.Flash.Error(ctx.Tr(errLocale.TrKey, errLocale.TrArgs...))
ctx.Redirect(redirectURL)
} else {