Documentation
¶
Index ¶
Constants ¶
View Source
const ( ErrorTypeRecordNotFound = ErrorType(iota) ErrorTypeInvalidRequest ErrorTypeServerInternalError )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Error ¶
type Error interface { error // GetCode 获取错误代码 GetCode() string // IsType 检查给定的错误是否是某个类型的错误 IsType(ErrorType) bool // Relation 将新的错误关联到当前错误 // 该方法返回当前错误对象 Relation(...Error) Error // Relations 获取所有关联的错误列表 Relations() []Error }
func ErrorInvalidRequest ¶
func ErrorRecordNotFound ¶
Click to show internal directories.
Click to hide internal directories.