Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsErrEqual ¶
Types ¶
type JKErr ¶
type JKErr interface {
error
Is(error) bool
Wrap(error) JKErr
ErrCode() JKErrorCode
String() string
IsErrEqual(err error) bool
}
func New ¶
func New(code JKErrorCode, format string, args ...interface{}) JKErr
type JKError ¶
type JKError struct {
Code JKErrorCode
Err error
Msg string
Stack *stacker
}
func (*JKError) ErrCode ¶
func (j *JKError) ErrCode() JKErrorCode
func (*JKError) IsErrEqual ¶
type JKErrorCode ¶
type JKErrorCode int
const ( UnknownErr JKErrorCode = -1 InitParseFailed JKErrorCode = 10001 InitParamTypeErr JKErrorCode = 20001 ExceptObject JKErrorCode = 20002 PathIllegalErr JKErrorCode = 30001 IterAllKeyErr JKErrorCode = 30002 ExcludePathErr JKErrorCode = 30003 )
func GetErrCode ¶
func GetErrCode(err error) JKErrorCode
func (JKErrorCode) String ¶
func (i JKErrorCode) String() string
Click to show internal directories.
Click to hide internal directories.