|
@@ -358,3 +358,10 @@ func NewWithException(code int, exception string) *EtaError {
|
|
|
}
|
|
|
return newExceptionWithOrgMsg(code, err, exception).(*EtaError)
|
|
|
}
|
|
|
+func NewExceptionWithOutError(code int) *EtaError {
|
|
|
+ err := ErrorMap[code]
|
|
|
+ if stringUtils.IsBlank(err) {
|
|
|
+ return newException(UnknownError, ErrorMap[UnknownError]).(*EtaError)
|
|
|
+ }
|
|
|
+ return newException(0, err).(*EtaError)
|
|
|
+}
|