mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Refactor error system (#33771)
It should not expose `util.SilentWrap` or construct it manually.
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
package i18n
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"reflect"
|
||||
)
|
||||
@@ -30,7 +31,7 @@ func Format(format string, args ...any) (msg string, err error) {
|
||||
fmtArgs = append(fmtArgs, val.Index(i).Interface())
|
||||
}
|
||||
} else {
|
||||
err = ErrUncertainArguments
|
||||
err = errors.New("arguments to i18n should not contain uncertain slices")
|
||||
break
|
||||
}
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user