Documentation ¶
Overview ¶
//nolint: errorlint // this is the new As method, also handling error lists
Index ¶
- Constants
- Variables
- func As(err error, target any) bool
- func ErrAlreadyExists(spec ...string) error
- func ErrAlreadyExistsWrap(err error, spec ...string) error
- func ErrClosed(spec ...string) error
- func ErrInvalid(spec ...string) error
- func ErrInvalidType(kind string, v interface{}) error
- func ErrInvalidWrap(err error, spec ...string) error
- func ErrNoMatch(spec ...string) error
- func ErrNoMatchWrap(err error, spec ...string) error
- func ErrNotFound(spec ...string) error
- func ErrNotFoundWrap(err error, spec ...string) error
- func ErrNotImplemented(spec ...string) error
- func ErrNotSupported(spec ...string) error
- func ErrReadOnly(spec ...string) error
- func ErrRecusion(kind string, elem interface{}, hist interface{}) error
- func ErrRecusionWrap(err error, kind string, elem interface{}, hist interface{}) error
- func ErrRequired(spec ...string) error
- func ErrRequiredWrap(err error, spec ...string) error
- func ErrStillInUse(spec ...string) error
- func ErrStillInUseWrap(err error, spec ...string) error
- func ErrUnknown(spec ...string) error
- func Is(err error, target error) bool
- func IsA(err error, target error) bool
- func IsErrAlreadyExists(err error) bool
- func IsErrAlreadyExistsKind(err error, kind string) bool
- func IsErrClosed(err error) bool
- func IsErrClosedKind(err error, kind string) bool
- func IsErrInvalid(err error) bool
- func IsErrInvalidKind(err error, kind string) bool
- func IsErrNRequired(err error) bool
- func IsErrNoMatch(err error) bool
- func IsErrNoMatchKind(err error, kind string) bool
- func IsErrNotFound(err error) bool
- func IsErrNotFoundElem(err error, kind, elem string) bool
- func IsErrNotFoundKind(err error, kind string) bool
- func IsErrNotImplemented(err error) bool
- func IsErrNotImplementedKind(err error, kind string) bool
- func IsErrNotSupported(err error) bool
- func IsErrNotSupportedKind(err error, kind string) bool
- func IsErrReadOnly(err error) bool
- func IsErrReadOnlyKind(err error, kind string) bool
- func IsErrRecursionKind(err error, kind string) bool
- func IsErrRecusion(err error) bool
- func IsErrRequiredElem(err error, kind, elem string) bool
- func IsErrRequiredKind(err error, kind string) bool
- func IsErrStillInUse(err error) bool
- func IsErrStillInUseKind(err error, kind string) bool
- func IsErrUnknown(err error) bool
- func IsErrUnknownKind(err error, kind string) bool
- func IsRetryable(err error) bool
- func Join(errs ...error) error
- func LogError(log logging.Logger, f ErrorFunction, msg string, keypair ...interface{})
- func NewEf(cause error, msg string, args ...interface{}) error
- func Newf(msg string, args ...interface{}) error
- func PropagateError(errp *error, f ErrorFunction)
- func PropagateErrorf(errp *error, f ErrorFunction, msg string, args ...interface{})
- func ToInterfaceSlice(list interface{}) []interface{}
- func Wrap(err error, args ...interface{}) error
- func Wrapf(err error, msg string, args ...interface{}) error
- type AlreadyExistsError
- func (e *AlreadyExistsError) Ctx() string
- func (e *AlreadyExistsError) CtxKind() string
- func (e *AlreadyExistsError) Elem() *string
- func (e *AlreadyExistsError) Error() string
- func (e *AlreadyExistsError) Is(o error) bool
- func (e *AlreadyExistsError) Kind() string
- func (e *AlreadyExistsError) SetKind(kind string)
- func (e *AlreadyExistsError) Unwrap() error
- type ClosedError
- func (e *ClosedError) Ctx() string
- func (e *ClosedError) CtxKind() string
- func (e *ClosedError) Elem() *string
- func (e *ClosedError) Error() string
- func (e *ClosedError) Is(o error) bool
- func (e *ClosedError) Kind() string
- func (e *ClosedError) SetKind(kind string)
- func (e *ClosedError) Unwrap() error
- type ErrorFormatter
- type ErrorFunction
- type ErrorList
- func (l *ErrorList) Add(errs ...error) *ErrorList
- func (l *ErrorList) Addf(writer io.Writer, err error, msg string, args ...interface{}) error
- func (l *ErrorList) Clear()
- func (l *ErrorList) Entries() []error
- func (l *ErrorList) Error() string
- func (l *ErrorList) Len() int
- func (l *ErrorList) Result() error
- func (l *ErrorList) Unwrap() []error
- type InvalidError
- func (e *InvalidError) Ctx() string
- func (e *InvalidError) CtxKind() string
- func (e *InvalidError) Elem() *string
- func (e *InvalidError) Error() string
- func (e *InvalidError) Is(o error) bool
- func (e *InvalidError) Kind() string
- func (e *InvalidError) SetKind(kind string)
- func (e *InvalidError) Unwrap() error
- type Kinded
- type NoMatchError
- func (e *NoMatchError) Ctx() string
- func (e *NoMatchError) CtxKind() string
- func (e *NoMatchError) Elem() *string
- func (e *NoMatchError) Error() string
- func (e *NoMatchError) Is(o error) bool
- func (e *NoMatchError) Kind() string
- func (e *NoMatchError) SetKind(kind string)
- func (e *NoMatchError) Unwrap() error
- type NotFoundError
- func (e *NotFoundError) Ctx() string
- func (e *NotFoundError) CtxKind() string
- func (e *NotFoundError) Elem() *string
- func (e *NotFoundError) Error() string
- func (e *NotFoundError) Is(o error) bool
- func (e *NotFoundError) Kind() string
- func (e *NotFoundError) SetKind(kind string)
- func (e *NotFoundError) Unwrap() error
- type NotImplementedError
- func (e *NotImplementedError) Ctx() string
- func (e *NotImplementedError) CtxKind() string
- func (e *NotImplementedError) Elem() *string
- func (e *NotImplementedError) Error() string
- func (e *NotImplementedError) Is(o error) bool
- func (e *NotImplementedError) Kind() string
- func (e *NotImplementedError) SetKind(kind string)
- func (e *NotImplementedError) Unwrap() error
- type NotSupportedError
- func (e *NotSupportedError) Ctx() string
- func (e *NotSupportedError) CtxKind() string
- func (e *NotSupportedError) Elem() *string
- func (e *NotSupportedError) Error() string
- func (e *NotSupportedError) Is(o error) bool
- func (e *NotSupportedError) Kind() string
- func (e *NotSupportedError) SetKind(kind string)
- func (e *NotSupportedError) Unwrap() error
- type ReadOnlyError
- func (e *ReadOnlyError) Ctx() string
- func (e *ReadOnlyError) CtxKind() string
- func (e *ReadOnlyError) Elem() *string
- func (e *ReadOnlyError) Error() string
- func (e *ReadOnlyError) Is(o error) bool
- func (e *ReadOnlyError) Kind() string
- func (e *ReadOnlyError) SetKind(kind string)
- func (e *ReadOnlyError) Unwrap() error
- type RecursionError
- type RequiredError
- func (e *RequiredError) Ctx() string
- func (e *RequiredError) CtxKind() string
- func (e *RequiredError) Elem() *string
- func (e *RequiredError) Error() string
- func (e *RequiredError) Is(o error) bool
- func (e *RequiredError) Kind() string
- func (e *RequiredError) SetKind(kind string)
- func (e *RequiredError) Unwrap() error
- type StillInUseError
- func (e *StillInUseError) Ctx() string
- func (e *StillInUseError) CtxKind() string
- func (e *StillInUseError) Elem() *string
- func (e *StillInUseError) Error() string
- func (e *StillInUseError) Is(o error) bool
- func (e *StillInUseError) Kind() string
- func (e *StillInUseError) SetKind(kind string)
- func (e *StillInUseError) Unwrap() error
- type UnknownError
- func (e *UnknownError) Ctx() string
- func (e *UnknownError) CtxKind() string
- func (e *UnknownError) Elem() *string
- func (e *UnknownError) Error() string
- func (e *UnknownError) Is(o error) bool
- func (e *UnknownError) Kind() string
- func (e *UnknownError) SetKind(kind string)
- func (e *UnknownError) Unwrap() error
Constants ¶
const ( KIND_FUNCTION = "function" KIND_SCHEMAVERSION = "schema version" KIND_COMPONENT = "component" KIND_ACCESSMETHOD = "access method" KIND_OBJECTTYPE = "object type" )
Variables ¶
var ( New = errors.New Unwrap = errors.Unwrap )
Functions ¶
func ErrAlreadyExists ¶
func ErrAlreadyExistsWrap ¶
func ErrInvalid ¶
func ErrInvalidType ¶ added in v0.7.0
ErrInvalidType reports an invalid or unexpected Go type for a dedicated purpose.
func ErrInvalidWrap ¶
func ErrNoMatch ¶ added in v0.7.0
func ErrNoMatchWrap ¶ added in v0.7.0
func ErrNotFound ¶
func ErrNotFoundWrap ¶
func ErrNotImplemented ¶
func ErrNotSupported ¶
func ErrReadOnly ¶
func ErrRecusion ¶
ErrRecusion describes a resursion errors caused by a dedicated element with an element history.
func ErrRecusionWrap ¶
func ErrRequired ¶ added in v0.5.0
func ErrRequiredWrap ¶ added in v0.5.0
func ErrStillInUse ¶ added in v0.3.0
func ErrStillInUseWrap ¶ added in v0.3.0
func ErrUnknown ¶
func IsErrAlreadyExists ¶
func IsErrAlreadyExistsKind ¶
func IsErrClosed ¶
func IsErrClosedKind ¶
func IsErrInvalid ¶
func IsErrInvalidKind ¶
func IsErrNRequired ¶ added in v0.5.0
func IsErrNoMatch ¶ added in v0.7.0
func IsErrNoMatchKind ¶ added in v0.7.0
func IsErrNotFound ¶
func IsErrNotFoundElem ¶ added in v0.5.0
func IsErrNotFoundKind ¶
func IsErrNotImplemented ¶
func IsErrNotImplementedKind ¶
func IsErrNotSupported ¶
func IsErrNotSupportedKind ¶
func IsErrReadOnly ¶
func IsErrReadOnlyKind ¶
func IsErrRecursionKind ¶
func IsErrRecusion ¶
func IsErrRequiredElem ¶ added in v0.5.0
func IsErrRequiredKind ¶ added in v0.5.0
func IsErrStillInUse ¶ added in v0.3.0
func IsErrStillInUseKind ¶ added in v0.3.0
func IsErrUnknown ¶
func IsErrUnknownKind ¶
func IsRetryable ¶
IsRetryable checks whether a retry should be performed for a failed operation.
func Join ¶ added in v0.3.0
Join combines any number of errors to a single error. If no or only nil errors are given nil is returned. If only one effective error is provided, this error is returned.
func LogError ¶ added in v0.7.0
func LogError(log logging.Logger, f ErrorFunction, msg string, keypair ...interface{})
func PropagateError ¶
func PropagateError(errp *error, f ErrorFunction)
PropagateError propagates a deferred error to the named return value whose address has to be passed as argument.
func PropagateErrorf ¶
func PropagateErrorf(errp *error, f ErrorFunction, msg string, args ...interface{})
PropagateErrorf propagates an optional deferred error to the named return value whose address has to be passed as argument. All errors, including the original one, are wrapped by the given context.
func ToInterfaceSlice ¶
func ToInterfaceSlice(list interface{}) []interface{}
Types ¶
type AlreadyExistsError ¶
type AlreadyExistsError struct {
// contains filtered or unexported fields
}
type ClosedError ¶
type ClosedError struct {
// contains filtered or unexported fields
}
type ErrorFormatter ¶
type ErrorFormatter interface {
Format(kind string, elem *string, ctxkind string, ctx string) string
}
func NewDefaultFormatter ¶
func NewDefaultFormatter(verb, msg, preposition string) ErrorFormatter
type ErrorFunction ¶
type ErrorFunction func() error
type ErrorList ¶
type ErrorList struct {
// contains filtered or unexported fields
}
ErrorList is an error type with erros in it.
type InvalidError ¶
type InvalidError struct {
// contains filtered or unexported fields
}
type NoMatchError ¶ added in v0.7.0
type NoMatchError struct {
// contains filtered or unexported fields
}
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
type NotImplementedError ¶
type NotImplementedError struct {
// contains filtered or unexported fields
}
type NotSupportedError ¶
type NotSupportedError struct {
// contains filtered or unexported fields
}
type ReadOnlyError ¶
type ReadOnlyError struct {
// contains filtered or unexported fields
}
type RecursionError ¶
type RecursionError struct {
// contains filtered or unexported fields
}
func (*RecursionError) Elem ¶
func (e *RecursionError) Elem() interface{}
func (*RecursionError) Error ¶
func (e *RecursionError) Error() string
func (*RecursionError) Kind ¶
func (e *RecursionError) Kind() string
func (*RecursionError) Unwrap ¶
func (e *RecursionError) Unwrap() error
type RequiredError ¶ added in v0.5.0
type RequiredError struct {
// contains filtered or unexported fields
}
type StillInUseError ¶ added in v0.3.0
type StillInUseError struct {
// contains filtered or unexported fields
}
type UnknownError ¶
type UnknownError struct {
// contains filtered or unexported fields
}