Documentation ¶
Index ¶
Constants ¶
View Source
const (
RetCodeSuccess = 0
)
Variables ¶
View Source
var ( SUCCESS = AppError{ErrorCode: 0, ErrorInfo: "SUCCESS"} INVALID_PARAMS = AppError{ErrorCode: 40, ErrorInfo: "请求参数错误"} ID_NOT_EMPTY = AppError{ErrorCode: 41, ErrorInfo: "ID为空"} ERROR_SERVER_ERROR = AppError{ErrorCode: 50, ErrorInfo: "服务内部错误"} ERROR_DATA_NOT_EXIST = AppError{ErrorCode: 51, ErrorInfo: "记录不存在"} ERROR_CONFIG_PARSE = AppError{ErrorCode: 52, ErrorInfo: "解析配置出错"} ERROR_LIMINT = AppError{ErrorCode: 59, ErrorInfo: "請求過載"} )
Functions ¶
func GetSystemPanic ¶
func GetSystemPanic(err interface{}) string
Types ¶
type AppError ¶
func CustomError ¶
自定义失败:错误码不变,在原错误信息的基础上,增加自定义错误信息
func NewErrorByError ¶
func (AppError) ErrorCodeStr ¶
Click to show internal directories.
Click to hide internal directories.