improve package gerror

This commit is contained in:
John Guo 2021-08-05 11:40:31 +08:00
parent 4c54b1cfbc
commit 00d7ee93b2

View File

@ -47,6 +47,9 @@ func (err *Error) Error() string {
return ""
}
errStr := err.text
if errStr == "" {
errStr = Message(err.code)
}
if err.error != nil {
if err.text != "" {
errStr += ": "