Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsCancelledError ¶ added in v0.8.0
IsCancelledError returns whether err is annotated as a context cancelled error.
func IsSystemError ¶
IsSystemError returns whether err is not annotated as a user error.
func IsUserError ¶
IsUserError returns whether err is annotated as a user error.
Types ¶
type CancelledError ¶ added in v0.8.0
type CancelledError struct {
// contains filtered or unexported fields
}
A CancelledError wraps an underlying error to annotite at as being caused by the cancellation of a context. CancelledErrors are also annotated as UserErrors.
func (CancelledError) Error ¶ added in v0.8.0
func (err CancelledError) Error() string
Error returns err's underlying error string.
func (CancelledError) Unwrap ¶ added in v0.8.0
func (err CancelledError) Unwrap() error
Unwrap returns err's underlying error.
type UserError ¶
type UserError struct {
// contains filtered or unexported fields
}
A UserError wraps an underlying error to annotate it as being caused by user error. The underlying error string is returned directly, meaning the annotation can be detected using errors.As without the annotation affecting how the errors are communicated.