修复NewFromMessage错误信息异常问题
This commit is contained in:
parent
f674702ad2
commit
b4732e360b
@ -125,7 +125,7 @@ func NewFromError(code interface{}, err error) IException {
|
||||
// Date : 22:25 2023/2/11
|
||||
func NewFromMessage(code interface{}, message string) IException {
|
||||
if len(message) == 0 {
|
||||
message = fmt.Sprintf("%v", code)
|
||||
message = getMessage(code, fmt.Sprintf("%v -> 未知异常信息", code))
|
||||
}
|
||||
return NewFromError(code, errors.New(message))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user