From b4732e360ba2a4be8eec19f456435e9143f3dad8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Mon, 25 Sep 2023 18:49:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DNewFromMessage=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E4=BF=A1=E6=81=AF=E5=BC=82=E5=B8=B8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- exception.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exception.go b/exception.go index b52b2a3..f63ddea 100644 --- a/exception.go +++ b/exception.go @@ -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)) }