修复NewFromMessage错误信息异常问题

This commit is contained in:
白茶清欢 2023-09-25 18:49:37 +08:00
parent f674702ad2
commit b4732e360b

View File

@ -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))
}