Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APIError ¶
type APIError struct { Code constant.APICodeType Msg string Data any // contains filtered or unexported fields }
func NewAPIError ¶
func NewAPIError(msg string, codeOpt ...constant.APICodeType) (ae *APIError)
NewAPIError 创建常规的 APIError,code 默认:API_ERROR
func NewAPIErrorWrap ¶
NewAPIErrorWrap 创建包装过原始错误信息的 APIError,并提供 stack ,code 默认:API_CRASH
func (*APIError) UnwrapError ¶ added in v1.3.2
UnwrapError 输出所有包装层的错误信息
Click to show internal directories.
Click to hide internal directories.