Improved error handling.

This commit is contained in:
Nuno Cruces
2023-12-05 16:11:56 +00:00
parent 06d2ff6752
commit 8b45cac16b
4 changed files with 54 additions and 58 deletions

View File

@@ -143,6 +143,8 @@ func errorCode(err error, def ErrorCode) (msg string, code uint32) {
return "", uint32(code)
case ExtendedErrorCode:
return "", uint32(code)
case *Error:
return code.msg, uint32(code.code)
case nil:
return "", _OK
}