mirror of
https://gitee.com/johng/gf
synced 2026-06-07 02:12:11 +08:00
add errors printing when i18n files loading failed for gi18n
This commit is contained in:
@ -30,6 +30,17 @@ func New(text string) error {
|
||||
}
|
||||
}
|
||||
|
||||
// Newf returns an error that formats as the given text.
|
||||
func Newf(format string, args ...interface{}) error {
|
||||
if format == "" {
|
||||
return nil
|
||||
}
|
||||
return &Error{
|
||||
stack: callers(),
|
||||
text: fmt.Sprintf(format, args...),
|
||||
}
|
||||
}
|
||||
|
||||
// Wrap wraps error with text.
|
||||
// It returns nil if given err is nil.
|
||||
func Wrap(err error, text string) error {
|
||||
|
||||
Reference in New Issue
Block a user