Documentation ¶
Index ¶
- Variables
- func As(err error, target interface{}) bool
- func GetErrorCode(err error) string
- func GetErrorCodes(err error) []string
- func Is(err, target error) bool
- func IsCode(err error, code Code) bool
- func NewError(code Code, err error) error
- func SkipGOROOT(b Backtrace) bool
- type Backtrace
- type Code
- type Error
- type Errors
- type ErrorsHook
- type StringCode
Constants ¶
This section is empty.
Variables ¶
View Source
var (
BacktraceCleaner = &backtraceCleaner{}
)
View Source
var (
CaptureBacktraceSize = 5
)
Functions ¶
func GetErrorCode ¶
func GetErrorCodes ¶
func SkipGOROOT ¶
Types ¶
type Errors ¶
type Errors struct {
// contains filtered or unexported fields
}
func (*Errors) Hook ¶
func (s *Errors) Hook(hook ErrorsHook)
type ErrorsHook ¶
type ErrorsHook func(error)
type StringCode ¶
type StringCode string
const ( UnknownErrorCode StringCode = "unknown" CanceledErrorCode StringCode = "canceled" TimeoutErrorCode StringCode = "timeout" TemporaryErrorCode StringCode = "temporary" )
func (StringCode) Error ¶
func (s StringCode) Error() string
func (StringCode) ErrorCode ¶
func (s StringCode) ErrorCode() string
Click to show internal directories.
Click to hide internal directories.