支持打印堆栈
This commit is contained in:
@ -16,15 +16,17 @@ type IException interface {
|
||||
// Error 兼容 go 内置 error
|
||||
Error() string
|
||||
// GetCode 获取错误码
|
||||
GetCode() interface{}
|
||||
GetCode() any
|
||||
// GetMessage *获取错误信息
|
||||
GetMessage() string
|
||||
// GetData 获取异常时的返回数据
|
||||
GetData() interface{}
|
||||
GetData() any
|
||||
// GetHttpCode 获取当前异常要返回的http状态码, 不设置则 默认 200
|
||||
GetHttpCode() int
|
||||
// ToError 转换为内置error类型
|
||||
ToError() error
|
||||
// IsCode 是否为指定code
|
||||
IsCode(code interface{}) bool
|
||||
IsCode(code any) bool
|
||||
// GetStack 获取调用堆栈
|
||||
GetStack() string
|
||||
}
|
||||
|
Reference in New Issue
Block a user