Documentation
¶
Index ¶
- func As(err error, target interface{}) bool
- func Is(err, target error) bool
- func New(s string, args ...interface{}) error
- func Unwrap(err error) error
- func WithStackTrace(skip int, err error) error
- type ErrorStack
- func (s *ErrorStack) AppendError(err error)
- func (s *ErrorStack) AppendErrorf(str string, args ...interface{})
- func (s ErrorStack) Error() string
- func (s ErrorStack) Errors() []error
- func (s *ErrorStack) MissingArgument(str string, args ...interface{})
- func (s *ErrorStack) MissingField(str string, args ...interface{})
- func (s ErrorStack) Ok() bool
- type Frame
- type MissingArgumentError
- type MissingFieldError
- type Panic
- type PanicError
- type Stack
- type StackError
- type StackTracer
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithStackTrace ¶ added in v0.0.2
Types ¶
type ErrorStack ¶ added in v0.2.0
type ErrorStack struct {
// contains filtered or unexported fields
}
func (*ErrorStack) AppendError ¶ added in v0.2.0
func (s *ErrorStack) AppendError(err error)
func (*ErrorStack) AppendErrorf ¶ added in v0.2.0
func (s *ErrorStack) AppendErrorf(str string, args ...interface{})
func (ErrorStack) Error ¶ added in v0.2.0
func (s ErrorStack) Error() string
func (ErrorStack) Errors ¶ added in v0.2.0
func (s ErrorStack) Errors() []error
func (*ErrorStack) MissingArgument ¶ added in v0.2.0
func (s *ErrorStack) MissingArgument(str string, args ...interface{})
func (*ErrorStack) MissingField ¶ added in v0.2.0
func (s *ErrorStack) MissingField(str string, args ...interface{})
func (ErrorStack) Ok ¶ added in v0.2.0
func (s ErrorStack) Ok() bool
type Frame ¶
type Frame struct {
// contains filtered or unexported fields
}
Heavily based on github.com/pkg/errors.Frame
func StackFrame ¶
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>)
%+n full package name followed by function name
%+v equivalent to %+s:%d
type MissingArgumentError ¶ added in v0.2.0
type MissingArgumentError struct {
// contains filtered or unexported fields
}
func ErrMissingArgument ¶ added in v0.2.0
func ErrMissingArgument(str string, args ...interface{}) *MissingArgumentError
func (MissingArgumentError) Error ¶ added in v0.2.0
func (e MissingArgumentError) Error() string
type MissingFieldError ¶ added in v0.2.0
type MissingFieldError struct {
// contains filtered or unexported fields
}
func ErrMissingField ¶ added in v0.2.0
func ErrMissingField(str string, args ...interface{}) *MissingFieldError
func (MissingFieldError) Error ¶ added in v0.2.0
func (e MissingFieldError) Error() string
type Panic ¶ added in v0.0.2
type Panic interface {
StackTracer
Error() string
Recovered() interface{}
}
type PanicError ¶ added in v0.0.2
type PanicError struct {
// contains filtered or unexported fields
}
func (*PanicError) Error ¶ added in v0.0.2
func (p *PanicError) Error() string
func (*PanicError) Recovered ¶ added in v0.0.2
func (p *PanicError) Recovered() interface{}
func (*PanicError) StackTrace ¶ added in v0.0.2
func (p *PanicError) StackTrace() Stack
func (*PanicError) Unwrap ¶ added in v0.0.2
func (p *PanicError) Unwrap() error
type StackError ¶ added in v0.0.2
type StackError struct {
// contains filtered or unexported fields
}
func (*StackError) Error ¶ added in v0.0.2
func (s *StackError) Error() string
func (*StackError) StackTrace ¶ added in v0.0.2
func (s *StackError) StackTrace() Stack
func (*StackError) Unwrap ¶ added in v0.0.2
func (s *StackError) Unwrap() error
type StackTracer ¶ added in v0.0.2
type StackTracer interface {
StackTrace() Stack
}
func AsStackTracer ¶ added in v0.2.0
func AsStackTracer(err error) (StackTracer, bool)
Click to show internal directories.
Click to hide internal directories.