Documentation ¶
Index ¶
- Constants
- type BaseError
- func DeveloperError(format string, args ...interface{}) *BaseError
- func ErrWrap(err error) *BaseError
- func InternalError(format string, args ...interface{}) *BaseError
- func InvalidParamError(format string, args ...interface{}) *BaseError
- func NewErrWithCode(code, format string, args ...interface{}) *BaseError
- func NewErrWithCodeV2(code, msg, logid string) *BaseError
- func ParseBaseError(err error) (baseError *BaseError, ok bool)
- func ParseErrForUser(err error) *BaseError
- type Frame
- type StackTrace
Constants ¶
View Source
const ( // Success SCFileDownload = "" SCSuccess = "0" // User return error ErrCodeFunctionError = "k_cf_ec_100001" // 函数错误 ErrCodeValidationError = "k_cf_ec_100002" // 校验错误 // User business error ErrCodeDeveloperError = "k_cf_ec_400001783" // System error ErrCodeInternalError = "k_cf_ec_200001" // 内部系统错误 // For developer error code // 无权限操作流程 ErrCodeFlowNoPermission = "k_wf_ec_200036" // 流程不存在 ErrCodeFlowNotExist = "k_wf_ec_2001006" // 流程实例 ID 不存在 ErrCodeFlowExecutionNotExist = "k_wf_ec_2001005" // 不支持调用此类型流程 ErrCodeFlowNotSupportCallFlowType = "k_wf_ec_2001004" // 不支持撤销该流程 (无人工任务) ErrCodeFlowNotSupportRevokeFlow = "k_wf_ec_2001003" // 缺少流程的必填参数 ErrCodeFlowNoReqInputParam = "k_wf_ec_2001002" // 流程参数中 APIName 无效 ErrCodeFlowInvalidParam = "k_wf_ec_2001001" // 记录不存在 ErrCodeDataRecordNotFound = "k_cf_ec_300004" // Deprecated ErrCodeRateLimitError = "k_cf_ec_200009" // 限流错误 // Deprecated ECOpenAPIRateLimitError = "k_op_ec_20003" // Deprecated ECFaaSInfraRateLimitError = "k_fs_ec_000004" // Deprecated ErrCodeInvalidParams = "k_cf_ec_300001" // 请求参数错误 // Deprecated ECUnknownError = "k_ec_000004" // Deprecated ECOpUnknownError = "k_op_ec_00001" // Deprecated ECSystemBusy = "k_op_ec_20001" // Deprecated ECSystemError = "k_op_ec_20002" // Deprecated FaaSInfraFailCodeMissingToken = "k_fs_ec_100001" // Deprecated ECTokenExpire = "k_ident_013000" // Deprecated ECIllegalToken = "k_ident_013001" // Deprecated ECMissingToken = "k_op_ec_10205" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseError ¶
type BaseError struct { Code string `json:"code"` Message string `json:"message"` Types []string `json:"types"` // contains filtered or unexported fields }
func DeveloperError ¶
func InternalError ¶
func InvalidParamError ¶
func NewErrWithCode ¶
Deprecated
func NewErrWithCodeV2 ¶ added in v0.0.22
func ParseBaseError ¶ added in v0.0.23
func ParseErrForUser ¶
type Frame ¶
type Frame uintptr
Frame represents a program counter inside a stack frame.
func (Frame) Format ¶
Format formats the frame according to the fmt.Formatter interface.
%s source file %d source line %n function name %v equivalent to %s:%d
Format accepts flags that alter the printing of some verbs, as follows:
%+s function name and path of source file relative to the compile time GOPATH separated by \n\t (<funcname>\n\t<path>) %+v equivalent to %+s:%d
type StackTrace ¶
type StackTrace []Frame
StackTrace is stack of Frames from innermost (newest) to outermost (oldest).
func (StackTrace) Format ¶
func (st StackTrace) Format(s fmt.State, verb rune)
Format formats the stack of Frames according to the fmt.Formatter interface.
%s lists source files for each Frame in the stack %v lists the source file and line number for each Frame in the stack
Format accepts flags that alter the printing of some verbs, as follows:
%+v Prints filename, function, and line number for each Frame in the stack.
Click to show internal directories.
Click to hide internal directories.