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 ErrInvalidWrap(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 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 IsErrNotFound(err error) 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 IsErrUnknown(err error) bool
- func IsErrUnknownKind(err error, kind string) bool
- func IsRetryable(err error) bool
- 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 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) Kind() string
- func (e *AlreadyExistsError) SetKind(kind string)
- func (e *AlreadyExistsError) Unwrap() error
- type ClosedError
- type ErrorFormatter
- type ErrorFunction
- type ErrorList
- type InvalidError
- type Kinded
- type NotFoundError
- 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) 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) Kind() string
- func (e *NotSupportedError) SetKind(kind string)
- func (e *NotSupportedError) Unwrap() error
- type ReadOnlyError
- type RecursionError
- type UnknownError
Constants ¶
View Source
const ( KIND_FUNCTION = "function" KIND_SCHEMAVERSION = "schema version" KIND_COMPONENT = "component" KIND_ACCESSMETHOD = "access method" KIND_OBJECTTYPE = "object type" )
Variables ¶
View Source
var ( New = errors.New Unwrap = errors.Unwrap )
Functions ¶
func ErrAlreadyExists ¶
func ErrAlreadyExistsWrap ¶
func ErrInvalid ¶
func ErrInvalidWrap ¶
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 ErrUnknown ¶
func IsErrAlreadyExists ¶
func IsErrAlreadyExistsKind ¶
func IsErrClosed ¶
func IsErrClosedKind ¶
func IsErrInvalid ¶
func IsErrInvalidKind ¶
func IsErrNotFound ¶
func IsErrNotFoundKind ¶
func IsErrNotImplemented ¶
func IsErrNotImplementedKind ¶
func IsErrNotSupported ¶
func IsErrNotSupportedKind ¶
func IsErrReadOnly ¶
func IsErrReadOnlyKind ¶
func IsErrRecursionKind ¶
func IsErrRecusion ¶
func IsErrUnknown ¶
func IsErrUnknownKind ¶
func IsRetryable ¶
IsRetryable checks whether a retry should be performed for a failed operation.
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 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 UnknownError ¶
type UnknownError struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.