Documentation
¶
Index ¶
- Variables
- func As(err error, target any) bool
- func CodeOf(err error) code
- func Factory() *factory
- func Is(err error, targets ...error) bool
- func IsNot(err error, targets ...error) bool
- func Join(errs ...error) error
- func NotAs(err error, target any) bool
- func Unwrap(err error) error
- type Error
- func (e *Error) As(err error) bool
- func (e *Error) Error() string
- func (e *Error) Is(err error) bool
- func (e *Error) IsEmpty() bool
- func (e *Error) String() string
- func (e *Error) Unwrap() []error
- func (e *Error) With(key string, value any) *Error
- func (e *Error) WithLocation() *Error
- func (e *Error) WithTime() *Error
- func (e *Error) WithTrace() *Error
- func (e *Error) Wrap(err error) *Error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCanceled = E(canceled) ErrUnknown = E(unknown) ErrInvalidArgument = E(invalidArgument) ErrDeadlineExceeded = E(deadlineExceeded) ErrNotFound = E(notFound) ErrAlreadyExists = E(alreadyExists) ErrPermissionDenied = E(permissionDenied) ErrResourceExhausted = E(resourceExhausted) ErrFailedPrecondition = E(failedPrecondition) ErrAborted = E(aborted) ErrOutOfRange = E(outOfRange) ErrUnimplemented = E(unimplemented) ErrInternal = E(internal) ErrDataLoss = E(dataLoss) ErrUnauthenticated = E(unauthenticated) )
View Source
var DefaultFactory = Factory().StackTrace(true)
Functions ¶
Types ¶
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
func (*Error) WithLocation ¶
Click to show internal directories.
Click to hide internal directories.