Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SuccessCode int64 = 0 FailureCode int64 = -1 Success = New(SuccessCode, "success") Failure = New(FailureCode, "failure") )
Functions ¶
Types ¶
type Exception ¶
type Exception interface {
GetCode() int64
GetSubException() Exception
GetMessage() string
Error() string
SubError(err error) Exception
NewSubError(code int64, msg string) Exception
}
func GenerateWhenError ¶
*
- 如果 err为一个err的话,返回最终的exception,否则,返回nil
- param: Exception mainException
- param: error err
- return Exception | nil
func NewFromError ¶
Click to show internal directories.
Click to hide internal directories.