Documentation ¶
Index ¶
- Constants
- func AddConsequence(err error, cons error) error
- func Cause(err error) (resp error)
- func Consequences(err error) []error
- func IgnoreError(in interface{}, _ Error) interface{}
- func IgnoreProblems(_ interface{})
- func IsError(err error) bool
- func IsGRPCError(err error) bool
- func OnExitConvertToGRPCStatus(ctx context.Context, err *error)
- func OnExitLogError(ctx context.Context, err interface{}, msg ...interface{})
- func OnExitLogErrorWithLevel(ctx context.Context, err interface{}, level logrus.Level, msg ...interface{})
- func OnExitTraceError(ctx context.Context, err interface{}, msg ...interface{})
- func OnExitWrapError(ctx context.Context, err interface{}, msg ...interface{})
- func OnPanic(err interface{})
- func RootCause(err error) (resp error)
- func SilentOnPanic(err interface{})
- func TakeError(_ interface{}, xerr Error) error
- func ToGRPCStatus(err error) error
- type ErrAborted
- func (e *ErrAborted) AddConsequence(err error) Error
- func (e *ErrAborted) Annotate(key string, value data.Annotation) data.Annotatable
- func (e ErrAborted) Annotation(key string) (data.Annotation, bool)
- func (e ErrAborted) Annotations() data.Annotations
- func (e ErrAborted) Cause() error
- func (e ErrAborted) Consequences() []error
- func (e ErrAborted) Error() string
- func (e *ErrAborted) IsNull() bool
- func (e ErrAborted) RootCause() error
- func (e ErrAborted) ToGRPCStatus() error
- func (e *ErrAborted) UnformattedError() string
- func (e ErrAborted) Unwrap() error
- func (e ErrAborted) Valid() bool
- func (e *ErrAborted) WithContext(ctx context.Context)
- type ErrAlteredNothing
- func (e *ErrAlteredNothing) AddConsequence(err error) Error
- func (e *ErrAlteredNothing) Annotate(key string, value data.Annotation) data.Annotatable
- func (e ErrAlteredNothing) Annotation(key string) (data.Annotation, bool)
- func (e ErrAlteredNothing) Annotations() data.Annotations
- func (e ErrAlteredNothing) Cause() error
- func (e ErrAlteredNothing) Consequences() []error
- func (e ErrAlteredNothing) Error() string
- func (e *ErrAlteredNothing) IsNull() bool
- func (e ErrAlteredNothing) RootCause() error
- func (e ErrAlteredNothing) ToGRPCStatus() error
- func (e *ErrAlteredNothing) UnformattedError() string
- func (e ErrAlteredNothing) Unwrap() error
- func (e ErrAlteredNothing) Valid() bool
- func (e *ErrAlteredNothing) WithContext(ctx context.Context)
- type ErrDuplicate
- func (e *ErrDuplicate) AddConsequence(err error) Error
- func (e *ErrDuplicate) Annotate(key string, value data.Annotation) data.Annotatable
- func (e ErrDuplicate) Annotation(key string) (data.Annotation, bool)
- func (e ErrDuplicate) Annotations() data.Annotations
- func (e ErrDuplicate) Cause() error
- func (e ErrDuplicate) Consequences() []error
- func (e ErrDuplicate) Error() string
- func (e *ErrDuplicate) IsNull() bool
- func (e ErrDuplicate) RootCause() error
- func (e ErrDuplicate) ToGRPCStatus() error
- func (e *ErrDuplicate) UnformattedError() string
- func (e ErrDuplicate) Unwrap() error
- func (e ErrDuplicate) Valid() bool
- func (e *ErrDuplicate) WithContext(ctx context.Context)
- type ErrExecution
- func (e *ErrExecution) AddConsequence(err error) Error
- func (e *ErrExecution) Annotate(key string, value data.Annotation) data.Annotatable
- func (e ErrExecution) Annotation(key string) (data.Annotation, bool)
- func (e ErrExecution) Annotations() data.Annotations
- func (e ErrExecution) Cause() error
- func (e ErrExecution) Consequences() []error
- func (e ErrExecution) Error() string
- func (e *ErrExecution) IsNull() bool
- func (e ErrExecution) RootCause() error
- func (e ErrExecution) ToGRPCStatus() error
- func (e *ErrExecution) UnformattedError() string
- func (e ErrExecution) Unwrap() error
- func (e ErrExecution) Valid() bool
- func (e *ErrExecution) WithContext(ctx context.Context)
- type ErrForbidden
- func (e *ErrForbidden) AddConsequence(err error) Error
- func (e *ErrForbidden) Annotate(key string, value data.Annotation) data.Annotatable
- func (e ErrForbidden) Annotation(key string) (data.Annotation, bool)
- func (e ErrForbidden) Annotations() data.Annotations
- func (e ErrForbidden) Cause() error
- func (e ErrForbidden) Consequences() []error
- func (e ErrForbidden) Error() string
- func (e *ErrForbidden) IsNull() bool
- func (e ErrForbidden) RootCause() error
- func (e ErrForbidden) ToGRPCStatus() error
- func (e *ErrForbidden) UnformattedError() string
- func (e ErrForbidden) Unwrap() error
- func (e ErrForbidden) Valid() bool
- func (e *ErrForbidden) WithContext(ctx context.Context)
- type ErrInconsistent
- func (e *ErrInconsistent) AddConsequence(err error) Error
- func (e *ErrInconsistent) Annotate(key string, value data.Annotation) data.Annotatable
- func (e ErrInconsistent) Annotation(key string) (data.Annotation, bool)
- func (e ErrInconsistent) Annotations() data.Annotations
- func (e ErrInconsistent) Cause() error
- func (e ErrInconsistent) Consequences() []error
- func (e ErrInconsistent) Error() string
- func (e *ErrInconsistent) IsNull() bool
- func (e ErrInconsistent) RootCause() error
- func (e ErrInconsistent) ToGRPCStatus() error
- func (e *ErrInconsistent) UnformattedError() string
- func (e ErrInconsistent) Unwrap() error
- func (e ErrInconsistent) Valid() bool
- func (e *ErrInconsistent) WithContext(ctx context.Context)
- type ErrInvalidInstance
- func (e *ErrInvalidInstance) AddConsequence(err error) Error
- func (e *ErrInvalidInstance) Annotate(key string, value data.Annotation) data.Annotatable
- func (e ErrInvalidInstance) Annotation(key string) (data.Annotation, bool)
- func (e ErrInvalidInstance) Annotations() data.Annotations
- func (e ErrInvalidInstance) Cause() error
- func (e ErrInvalidInstance) Consequences() []error
- func (e ErrInvalidInstance) Error() string
- func (e *ErrInvalidInstance) IsNull() bool
- func (e ErrInvalidInstance) RootCause() error
- func (e ErrInvalidInstance) ToGRPCStatus() error
- func (e *ErrInvalidInstance) UnformattedError() string
- func (e ErrInvalidInstance) Unwrap() error
- func (e ErrInvalidInstance) Valid() bool
- func (e *ErrInvalidInstance) WithContext(ctx context.Context)
- type ErrInvalidInstanceContent
- func (e *ErrInvalidInstanceContent) AddConsequence(err error) Error
- func (e *ErrInvalidInstanceContent) Annotate(key string, value data.Annotation) data.Annotatable
- func (e ErrInvalidInstanceContent) Annotation(key string) (data.Annotation, bool)
- func (e ErrInvalidInstanceContent) Annotations() data.Annotations
- func (e ErrInvalidInstanceContent) Cause() error
- func (e ErrInvalidInstanceContent) Consequences() []error
- func (e ErrInvalidInstanceContent) Error() string
- func (e *ErrInvalidInstanceContent) IsNull() bool
- func (e ErrInvalidInstanceContent) RootCause() error
- func (e ErrInvalidInstanceContent) ToGRPCStatus() error
- func (e *ErrInvalidInstanceContent) UnformattedError() string
- func (e ErrInvalidInstanceContent) Unwrap() error
- func (e ErrInvalidInstanceContent) Valid() bool
- func (e *ErrInvalidInstanceContent) WithContext(ctx context.Context)
- type ErrInvalidParameter
- func InvalidParameterCannotBeEmptyStringError(what string) *ErrInvalidParameter
- func InvalidParameterCannotBeNilError(what string) *ErrInvalidParameter
- func InvalidParameterError(what string, why ...interface{}) *ErrInvalidParameter
- func InvalidParameterErrorWithCauseAndConsequences(cause error, consequences []error, what string, skip uint, why ...interface{}) *ErrInvalidParameter
- func (e *ErrInvalidParameter) AddConsequence(err error) Error
- func (e *ErrInvalidParameter) Annotate(key string, value data.Annotation) data.Annotatable
- func (e ErrInvalidParameter) Annotation(key string) (data.Annotation, bool)
- func (e ErrInvalidParameter) Annotations() data.Annotations
- func (e ErrInvalidParameter) Cause() error
- func (e ErrInvalidParameter) Consequences() []error
- func (e ErrInvalidParameter) Error() string
- func (e *ErrInvalidParameter) IsNull() bool
- func (e ErrInvalidParameter) RootCause() error
- func (e ErrInvalidParameter) ToGRPCStatus() error
- func (e *ErrInvalidParameter) UnformattedError() string
- func (e ErrInvalidParameter) Unwrap() error
- func (e ErrInvalidParameter) Valid() bool
- func (e *ErrInvalidParameter) WithContext(ctx context.Context)
- type ErrInvalidRequest
- func (e *ErrInvalidRequest) AddConsequence(err error) Error
- func (e *ErrInvalidRequest) Annotate(key string, value data.Annotation) data.Annotatable
- func (e ErrInvalidRequest) Annotation(key string) (data.Annotation, bool)
- func (e ErrInvalidRequest) Annotations() data.Annotations
- func (e ErrInvalidRequest) Cause() error
- func (e ErrInvalidRequest) Consequences() []error
- func (e ErrInvalidRequest) Error() string
- func (e *ErrInvalidRequest) IsNull() bool
- func (e ErrInvalidRequest) RootCause() error
- func (e ErrInvalidRequest) ToGRPCStatus() error
- func (e *ErrInvalidRequest) UnformattedError() string
- func (e ErrInvalidRequest) Unwrap() error
- func (e ErrInvalidRequest) Valid() bool
- func (e *ErrInvalidRequest) WithContext(ctx context.Context)
- type ErrNotAuthenticated
- func (e *ErrNotAuthenticated) AddConsequence(err error) Error
- func (e *ErrNotAuthenticated) Annotate(key string, value data.Annotation) data.Annotatable
- func (e ErrNotAuthenticated) Annotation(key string) (data.Annotation, bool)
- func (e ErrNotAuthenticated) Annotations() data.Annotations
- func (e ErrNotAuthenticated) Cause() error
- func (e ErrNotAuthenticated) Consequences() []error
- func (e ErrNotAuthenticated) Error() string
- func (e *ErrNotAuthenticated) IsNull() bool
- func (e ErrNotAuthenticated) RootCause() error
- func (e ErrNotAuthenticated) ToGRPCStatus() error
- func (e *ErrNotAuthenticated) UnformattedError() string
- func (e ErrNotAuthenticated) Unwrap() error
- func (e ErrNotAuthenticated) Valid() bool
- func (e *ErrNotAuthenticated) WithContext(ctx context.Context)
- type ErrNotAvailable
- func (e *ErrNotAvailable) AddConsequence(err error) Error
- func (e *ErrNotAvailable) Annotate(key string, value data.Annotation) data.Annotatable
- func (e ErrNotAvailable) Annotation(key string) (data.Annotation, bool)
- func (e ErrNotAvailable) Annotations() data.Annotations
- func (e ErrNotAvailable) Cause() error
- func (e ErrNotAvailable) Consequences() []error
- func (e ErrNotAvailable) Error() string
- func (e *ErrNotAvailable) IsNull() bool
- func (e ErrNotAvailable) RootCause() error
- func (e ErrNotAvailable) ToGRPCStatus() error
- func (e *ErrNotAvailable) UnformattedError() string
- func (e ErrNotAvailable) Unwrap() error
- func (e ErrNotAvailable) Valid() bool
- func (e *ErrNotAvailable) WithContext(ctx context.Context)
- type ErrNotFound
- func (e *ErrNotFound) AddConsequence(err error) Error
- func (e *ErrNotFound) Annotate(key string, value data.Annotation) data.Annotatable
- func (e ErrNotFound) Annotation(key string) (data.Annotation, bool)
- func (e ErrNotFound) Annotations() data.Annotations
- func (e ErrNotFound) Cause() error
- func (e ErrNotFound) Consequences() []error
- func (e ErrNotFound) Error() string
- func (e *ErrNotFound) IsNull() bool
- func (e ErrNotFound) RootCause() error
- func (e ErrNotFound) ToGRPCStatus() error
- func (e *ErrNotFound) UnformattedError() string
- func (e ErrNotFound) Unwrap() error
- func (e ErrNotFound) Valid() bool
- func (e *ErrNotFound) WithContext(ctx context.Context)
- func (e *ErrNotFound) WithCtx(ctx context.Context) *ErrNotFound
- type ErrNotImplemented
- func (e *ErrNotImplemented) AddConsequence(err error) Error
- func (e *ErrNotImplemented) Annotate(key string, value data.Annotation) data.Annotatable
- func (e ErrNotImplemented) Annotation(key string) (data.Annotation, bool)
- func (e ErrNotImplemented) Annotations() data.Annotations
- func (e ErrNotImplemented) Cause() error
- func (e ErrNotImplemented) Consequences() []error
- func (e ErrNotImplemented) Error() string
- func (e *ErrNotImplemented) IsNull() bool
- func (e ErrNotImplemented) RootCause() error
- func (e ErrNotImplemented) ToGRPCStatus() error
- func (e *ErrNotImplemented) UnformattedError() string
- func (e ErrNotImplemented) Unwrap() error
- func (e ErrNotImplemented) Valid() bool
- func (e *ErrNotImplemented) WithContext(ctx context.Context)
- type ErrOverflow
- func (e *ErrOverflow) AddConsequence(err error) Error
- func (e *ErrOverflow) Annotate(key string, value data.Annotation) data.Annotatable
- func (e ErrOverflow) Annotation(key string) (data.Annotation, bool)
- func (e ErrOverflow) Annotations() data.Annotations
- func (e ErrOverflow) Cause() error
- func (e ErrOverflow) Consequences() []error
- func (e ErrOverflow) Error() string
- func (e *ErrOverflow) IsNull() bool
- func (e ErrOverflow) RootCause() error
- func (e ErrOverflow) ToGRPCStatus() error
- func (e *ErrOverflow) UnformattedError() string
- func (e ErrOverflow) Unwrap() error
- func (e ErrOverflow) Valid() bool
- func (e *ErrOverflow) WithContext(ctx context.Context)
- type ErrOverload
- func (e *ErrOverload) AddConsequence(err error) Error
- func (e *ErrOverload) Annotate(key string, value data.Annotation) data.Annotatable
- func (e ErrOverload) Annotation(key string) (data.Annotation, bool)
- func (e ErrOverload) Annotations() data.Annotations
- func (e ErrOverload) Cause() error
- func (e ErrOverload) Consequences() []error
- func (e ErrOverload) Error() string
- func (e *ErrOverload) IsNull() bool
- func (e ErrOverload) RootCause() error
- func (e ErrOverload) ToGRPCStatus() error
- func (e *ErrOverload) UnformattedError() string
- func (e ErrOverload) Unwrap() error
- func (e ErrOverload) Valid() bool
- func (e *ErrOverload) WithContext(ctx context.Context)
- type ErrRuntimePanic
- func (e *ErrRuntimePanic) AddConsequence(err error) Error
- func (e *ErrRuntimePanic) Annotate(key string, value data.Annotation) data.Annotatable
- func (e ErrRuntimePanic) Annotation(key string) (data.Annotation, bool)
- func (e ErrRuntimePanic) Annotations() data.Annotations
- func (e ErrRuntimePanic) Cause() error
- func (e ErrRuntimePanic) Consequences() []error
- func (e ErrRuntimePanic) Error() string
- func (e *ErrRuntimePanic) IsNull() bool
- func (e ErrRuntimePanic) RootCause() error
- func (e ErrRuntimePanic) ToGRPCStatus() error
- func (e *ErrRuntimePanic) UnformattedError() string
- func (e ErrRuntimePanic) Unwrap() error
- func (e ErrRuntimePanic) Valid() bool
- func (e *ErrRuntimePanic) WithContext(ctx context.Context)
- type ErrSyntax
- func (e *ErrSyntax) AddConsequence(err error) Error
- func (e *ErrSyntax) Annotate(key string, value data.Annotation) data.Annotatable
- func (e ErrSyntax) Annotation(key string) (data.Annotation, bool)
- func (e ErrSyntax) Annotations() data.Annotations
- func (e ErrSyntax) Cause() error
- func (e ErrSyntax) Consequences() []error
- func (e ErrSyntax) Error() string
- func (e *ErrSyntax) IsNull() bool
- func (e ErrSyntax) RootCause() error
- func (e ErrSyntax) ToGRPCStatus() error
- func (e *ErrSyntax) UnformattedError() string
- func (e ErrSyntax) Unwrap() error
- func (e ErrSyntax) Valid() bool
- func (e *ErrSyntax) WithContext(ctx context.Context)
- type ErrTimeout
- func (e *ErrTimeout) AddConsequence(err error) Error
- func (e *ErrTimeout) Annotate(key string, value data.Annotation) data.Annotatable
- func (e ErrTimeout) Annotation(key string) (data.Annotation, bool)
- func (e ErrTimeout) Annotations() data.Annotations
- func (e ErrTimeout) Cause() error
- func (e ErrTimeout) Consequences() []error
- func (e ErrTimeout) Error() string
- func (e *ErrTimeout) IsNull() bool
- func (e ErrTimeout) RootCause() error
- func (e ErrTimeout) ToGRPCStatus() error
- func (e *ErrTimeout) UnformattedError() string
- func (e ErrTimeout) Unwrap() error
- func (e ErrTimeout) Valid() bool
- func (e *ErrTimeout) WithContext(ctx context.Context)
- type ErrUnknown
- func (e *ErrUnknown) AddConsequence(err error) Error
- func (e *ErrUnknown) Annotate(key string, value data.Annotation) data.Annotatable
- func (e ErrUnknown) Annotation(key string) (data.Annotation, bool)
- func (e ErrUnknown) Annotations() data.Annotations
- func (e ErrUnknown) Cause() error
- func (e ErrUnknown) Consequences() []error
- func (e ErrUnknown) Error() string
- func (e *ErrUnknown) IsNull() bool
- func (e ErrUnknown) RootCause() error
- func (e ErrUnknown) ToGRPCStatus() error
- func (e *ErrUnknown) UnformattedError() string
- func (e ErrUnknown) Unwrap() error
- func (e ErrUnknown) Valid() bool
- func (e *ErrUnknown) WithContext(ctx context.Context)
- type ErrUnqualified
- func (e ErrUnqualified) AddConsequence(err error) Error
- func (e ErrUnqualified) Annotate(key string, value data.Annotation) data.Annotatable
- func (e ErrUnqualified) Annotation(key string) (data.Annotation, bool)
- func (e ErrUnqualified) Annotations() data.Annotations
- func (e ErrUnqualified) Cause() error
- func (e ErrUnqualified) Consequences() []error
- func (e ErrUnqualified) Error() string
- func (e ErrUnqualified) IsNull() bool
- func (e ErrUnqualified) RootCause() error
- func (e ErrUnqualified) ToGRPCStatus() error
- func (e ErrUnqualified) UnformattedError() string
- func (e ErrUnqualified) Unwrap() error
- func (e ErrUnqualified) Valid() bool
- func (e ErrUnqualified) WithContext(ctx context.Context)
- type ErrWarning
- func (e *ErrWarning) AddConsequence(err error) Error
- func (e *ErrWarning) Annotate(key string, value data.Annotation) data.Annotatable
- func (e ErrWarning) Annotation(key string) (data.Annotation, bool)
- func (e ErrWarning) Annotations() data.Annotations
- func (e ErrWarning) Cause() error
- func (e ErrWarning) Consequences() []error
- func (e ErrWarning) Error() string
- func (e *ErrWarning) IsNull() bool
- func (e ErrWarning) RootCause() error
- func (e ErrWarning) ToGRPCStatus() error
- func (e *ErrWarning) UnformattedError() string
- func (e ErrWarning) Unwrap() error
- func (e ErrWarning) Valid() bool
- func (e *ErrWarning) WithContext(ctx context.Context)
- type Error
- func Annotate(err error, key string, content interface{}) Error
- func ConvertError(err error) Error
- func FromGRPCStatus(err error) Error
- func InvalidRequestError(msg ...interface{}) Error
- func InvalidRequestErrorWithCause(cause error, consequences []error, msg ...interface{}) Error
- func NewError(msg ...interface{}) Error
- func NewErrorList(errors []error) Error
- func NewErrorListComplete(errors []error, cause error, consequences []error, msg ...interface{}) Error
- func NewErrorWithCause(cause error, msg ...interface{}) Error
- func NewErrorWithCauseAndConsequences(cause error, consequences []error, msg ...interface{}) Error
- func NotImplementedErrorWithCauseAndConsequences(cause error, consequences []error, msg ...interface{}) Error
- func Wrap(cause error, msg ...interface{}) Error
- type ErrorLike
- type ErrorList
- func (el *ErrorList) AddConsequence(err error) Error
- func (el *ErrorList) Annotate(key string, value data.Annotation) data.Annotatable
- func (e ErrorList) Annotation(key string) (data.Annotation, bool)
- func (e ErrorList) Annotations() data.Annotations
- func (e ErrorList) Cause() error
- func (e ErrorList) Consequences() []error
- func (el *ErrorList) Error() string
- func (e ErrorList) IsNull() bool
- func (e ErrorList) RootCause() error
- func (el *ErrorList) ToErrorSlice() []error
- func (el ErrorList) ToGRPCStatus() error
- func (el *ErrorList) UnformattedError() string
- func (e ErrorList) Unwrap() error
- func (e ErrorList) Valid() bool
- func (el *ErrorList) WithContext(ctx context.Context)
- func (el *ErrorList) WithCtx(ctx context.Context) *ErrorList
- type Status
Constants ¶
const EmbeddedErrorStructName = "errorCore"
Variables ¶
This section is empty.
Functions ¶
func AddConsequence ¶
AddConsequence adds an error 'err' to the list of consequences
func Cause ¶
Cause returns the direct cause of an error if it implements the causer interface and that cause is not-nil in any other case, returns the unmodified error 'err'
func Consequences ¶
Consequences returns the list of consequences
func IgnoreError ¶
func IgnoreError(in interface{}, _ Error) interface{}
func IgnoreProblems ¶
func IgnoreProblems(_ interface{})
func OnExitConvertToGRPCStatus ¶
OnExitConvertToGRPCStatus converts err to GRPC Status.
func OnExitLogError ¶
OnExitLogError logs error with level logrus.ErrorLevel. func OnExitLogError(in string, err *error) {
func OnExitLogErrorWithLevel ¶
func OnExitLogErrorWithLevel(ctx context.Context, err interface{}, level logrus.Level, msg ...interface{})
OnExitLogErrorWithLevel logs error with the log level wanted
func OnExitTraceError ¶
OnExitTraceError logs error with level logrus.TraceLevel. func OnExitTraceError(in string, err *error) {
func OnExitWrapError ¶
OnExitWrapError wraps the error with the message
func OnPanic ¶
func OnPanic(err interface{})
OnPanic captures panic error and fill the error pointer with a ErrRuntimePanic.
func RootCause ¶
RootCause follows the chain of causes / wrapped errors and returns the last not-nil error
func SilentOnPanic ¶
func SilentOnPanic(err interface{})
SilentOnPanic captures panic error and logs the error, is intended for functions that DON'T return errors
func ToGRPCStatus ¶
ToGRPCStatus translates an error to a GRPC status
Types ¶
type ErrAborted ¶
type ErrAborted struct {
// contains filtered or unexported fields
}
ErrAborted is used to signal abortion
func AbortedError ¶
func AbortedError(err error, msg ...interface{}) *ErrAborted
AbortedError creates an ErrAborted error If err != nil, 'err' will become the cause of the abortion that can be retrieved using Error.Cause()
func AbortedErrorWithCauseAndConsequences ¶
func AbortedErrorWithCauseAndConsequences(err error, consequences []error, msg ...interface{}) *ErrAborted
AbortedErrorWithCauseAndConsequences creates an ErrAborted error
func (*ErrAborted) AddConsequence ¶
func (e *ErrAborted) AddConsequence(err error) Error
AddConsequence adds a consequence 'err' to current error 'e'
func (*ErrAborted) Annotate ¶
func (e *ErrAborted) Annotate(key string, value data.Annotation) data.Annotatable
Annotate adds an Annotation (key-value) pair to current error 'e', using the key 'key' and the value 'value'
func (ErrAborted) Annotation ¶
func (e ErrAborted) Annotation(key string) (data.Annotation, bool)
Annotation ...
func (ErrAborted) Cause ¶
func (e ErrAborted) Cause() error
Cause is just an accessor for internal e.cause
func (ErrAborted) Consequences ¶
func (e ErrAborted) Consequences() []error
Consequences returns the consequences of current error (detected teardown problems)
func (ErrAborted) Error ¶
func (e ErrAborted) Error() string
Error returns a human-friendly error explanation
func (ErrAborted) RootCause ¶
func (e ErrAborted) RootCause() error
RootCause returns the initial error's cause
func (ErrAborted) ToGRPCStatus ¶
func (e ErrAborted) ToGRPCStatus() error
ToGRPCStatus returns a grpcstatus struct from error
func (*ErrAborted) UnformattedError ¶
func (e *ErrAborted) UnformattedError() string
UnformattedError returns Error() without any extra formatting applied
func (ErrAborted) Unwrap ¶
func (e ErrAborted) Unwrap() error
Unwrap implements the Wrapper interface
func (ErrAborted) Valid ¶
func (e ErrAborted) Valid() bool
Valid errorCore struct should be always created via newError constructor, if it doesn't we might miss e.lock initialization
func (*ErrAborted) WithContext ¶
func (e *ErrAborted) WithContext(ctx context.Context)
type ErrAlteredNothing ¶
type ErrAlteredNothing struct {
// contains filtered or unexported fields
}
ErrAlteredNothing is used when an Alter() call changed nothing
func AlteredNothingError ¶
func AlteredNothingError(msg ...interface{}) *ErrAlteredNothing
AlteredNothingError creates an ErrAlteredNothing error
func AlteredNothingErrorWithCause ¶
func AlteredNothingErrorWithCause(cause error, consequences []error, msg ...interface{}) *ErrAlteredNothing
AlteredNothingErrorWithCause creates an ErrAlteredNothing error
func (*ErrAlteredNothing) AddConsequence ¶
func (e *ErrAlteredNothing) AddConsequence(err error) Error
AddConsequence adds a consequence 'err' to current error 'e'
func (*ErrAlteredNothing) Annotate ¶
func (e *ErrAlteredNothing) Annotate(key string, value data.Annotation) data.Annotatable
Annotate adds an Annotation (key-value) pair to current error 'e', using the key 'key' and the value 'value'
func (ErrAlteredNothing) Annotation ¶
func (e ErrAlteredNothing) Annotation(key string) (data.Annotation, bool)
Annotation ...
func (ErrAlteredNothing) Annotations ¶
func (e ErrAlteredNothing) Annotations() data.Annotations
Annotations ...
func (ErrAlteredNothing) Cause ¶
func (e ErrAlteredNothing) Cause() error
Cause is just an accessor for internal e.cause
func (ErrAlteredNothing) Consequences ¶
func (e ErrAlteredNothing) Consequences() []error
Consequences returns the consequences of current error (detected teardown problems)
func (ErrAlteredNothing) Error ¶
func (e ErrAlteredNothing) Error() string
Error returns a human-friendly error explanation
func (*ErrAlteredNothing) IsNull ¶
func (e *ErrAlteredNothing) IsNull() bool
IsNull tells if the instance is null
func (ErrAlteredNothing) RootCause ¶
func (e ErrAlteredNothing) RootCause() error
RootCause returns the initial error's cause
func (ErrAlteredNothing) ToGRPCStatus ¶
func (e ErrAlteredNothing) ToGRPCStatus() error
ToGRPCStatus returns a grpcstatus struct from error
func (*ErrAlteredNothing) UnformattedError ¶
func (e *ErrAlteredNothing) UnformattedError() string
UnformattedError returns Error() without any extra formatting applied
func (ErrAlteredNothing) Unwrap ¶
func (e ErrAlteredNothing) Unwrap() error
Unwrap implements the Wrapper interface
func (ErrAlteredNothing) Valid ¶
func (e ErrAlteredNothing) Valid() bool
Valid errorCore struct should be always created via newError constructor, if it doesn't we might miss e.lock initialization
func (*ErrAlteredNothing) WithContext ¶
func (e *ErrAlteredNothing) WithContext(ctx context.Context)
type ErrDuplicate ¶
type ErrDuplicate struct {
// contains filtered or unexported fields
}
ErrDuplicate already exists error
func DuplicateError ¶
func DuplicateError(msg ...interface{}) *ErrDuplicate
DuplicateError creates an ErrDuplicate error
func DuplicateErrorWithCause ¶
func DuplicateErrorWithCause(cause error, consequences []error, msg ...interface{}) *ErrDuplicate
DuplicateErrorWithCause creates an ErrDuplicate error initialized with cause 'cause'
func (*ErrDuplicate) AddConsequence ¶
func (e *ErrDuplicate) AddConsequence(err error) Error
AddConsequence adds a consequence 'err' to current error 'e'
func (*ErrDuplicate) Annotate ¶
func (e *ErrDuplicate) Annotate(key string, value data.Annotation) data.Annotatable
Annotate adds an Annotation (key-value) pair to current error 'e', using the key 'key' and the value 'value' satisfies interface data.Annotatable
func (ErrDuplicate) Annotation ¶
func (e ErrDuplicate) Annotation(key string) (data.Annotation, bool)
Annotation ...
func (ErrDuplicate) Annotations ¶
func (e ErrDuplicate) Annotations() data.Annotations
Annotations ...
func (ErrDuplicate) Cause ¶
func (e ErrDuplicate) Cause() error
Cause is just an accessor for internal e.cause
func (ErrDuplicate) Consequences ¶
func (e ErrDuplicate) Consequences() []error
Consequences returns the consequences of current error (detected teardown problems)
func (ErrDuplicate) Error ¶
func (e ErrDuplicate) Error() string
Error returns a human-friendly error explanation
func (*ErrDuplicate) IsNull ¶
func (e *ErrDuplicate) IsNull() bool
IsNull tells if the instance is null
func (ErrDuplicate) RootCause ¶
func (e ErrDuplicate) RootCause() error
RootCause returns the initial error's cause
func (ErrDuplicate) ToGRPCStatus ¶
func (e ErrDuplicate) ToGRPCStatus() error
ToGRPCStatus returns a grpcstatus struct from error
func (*ErrDuplicate) UnformattedError ¶
func (e *ErrDuplicate) UnformattedError() string
UnformattedError returns Error() without any extra formatting applied
func (ErrDuplicate) Unwrap ¶
func (e ErrDuplicate) Unwrap() error
Unwrap implements the Wrapper interface
func (ErrDuplicate) Valid ¶
func (e ErrDuplicate) Valid() bool
Valid errorCore struct should be always created via newError constructor, if it doesn't we might miss e.lock initialization
func (*ErrDuplicate) WithContext ¶
func (e *ErrDuplicate) WithContext(ctx context.Context)
type ErrExecution ¶
type ErrExecution struct {
// contains filtered or unexported fields
}
ErrExecution is used when code ErrExecution failed
func ExecutionError ¶
func ExecutionError(exitError error, msg ...interface{}) *ErrExecution
ExecutionError creates an ErrExecution error
func ExecutionErrorWithCause ¶
func ExecutionErrorWithCause(exitError error, consequences []error, msg ...interface{}) *ErrExecution
ExecutionErrorWithCause creates an ErrExecution error
func (*ErrExecution) AddConsequence ¶
func (e *ErrExecution) AddConsequence(err error) Error
AddConsequence adds a consequence 'err' to current error 'e'
func (*ErrExecution) Annotate ¶
func (e *ErrExecution) Annotate(key string, value data.Annotation) data.Annotatable
Annotate adds an Annotation (key-value) pair to current error 'e', using the key 'key' and the value 'value'
func (ErrExecution) Annotation ¶
func (e ErrExecution) Annotation(key string) (data.Annotation, bool)
Annotation ...
func (ErrExecution) Annotations ¶
func (e ErrExecution) Annotations() data.Annotations
Annotations ...
func (ErrExecution) Cause ¶
func (e ErrExecution) Cause() error
Cause is just an accessor for internal e.cause
func (ErrExecution) Consequences ¶
func (e ErrExecution) Consequences() []error
Consequences returns the consequences of current error (detected teardown problems)
func (ErrExecution) Error ¶
func (e ErrExecution) Error() string
Error returns a human-friendly error explanation
func (*ErrExecution) IsNull ¶
func (e *ErrExecution) IsNull() bool
IsNull tells if the instance is null
func (ErrExecution) RootCause ¶
func (e ErrExecution) RootCause() error
RootCause returns the initial error's cause
func (ErrExecution) ToGRPCStatus ¶
func (e ErrExecution) ToGRPCStatus() error
ToGRPCStatus returns a grpcstatus struct from error
func (*ErrExecution) UnformattedError ¶
func (e *ErrExecution) UnformattedError() string
UnformattedError returns Error() without any extra formatting applied
func (ErrExecution) Unwrap ¶
func (e ErrExecution) Unwrap() error
Unwrap implements the Wrapper interface
func (ErrExecution) Valid ¶
func (e ErrExecution) Valid() bool
Valid errorCore struct should be always created via newError constructor, if it doesn't we might miss e.lock initialization
func (*ErrExecution) WithContext ¶
func (e *ErrExecution) WithContext(ctx context.Context)
type ErrForbidden ¶
type ErrForbidden struct {
// contains filtered or unexported fields
}
ErrForbidden when action is not allowed.
func ForbiddenError ¶
func ForbiddenError(msg ...interface{}) *ErrForbidden
ForbiddenError creates an ErrForbidden error
func ForbiddenErrorWithCause ¶
func ForbiddenErrorWithCause(cause error, consequences []error, msg ...interface{}) *ErrForbidden
ForbiddenErrorWithCause creates an ErrForbidden error
func (*ErrForbidden) AddConsequence ¶
func (e *ErrForbidden) AddConsequence(err error) Error
AddConsequence adds a consequence 'err' to current error 'e'
func (*ErrForbidden) Annotate ¶
func (e *ErrForbidden) Annotate(key string, value data.Annotation) data.Annotatable
Annotate adds an Annotation (key-value) pair to current error 'e', using the key 'key' and the value 'value'
func (ErrForbidden) Annotation ¶
func (e ErrForbidden) Annotation(key string) (data.Annotation, bool)
Annotation ...
func (ErrForbidden) Annotations ¶
func (e ErrForbidden) Annotations() data.Annotations
Annotations ...
func (ErrForbidden) Cause ¶
func (e ErrForbidden) Cause() error
Cause is just an accessor for internal e.cause
func (ErrForbidden) Consequences ¶
func (e ErrForbidden) Consequences() []error
Consequences returns the consequences of current error (detected teardown problems)
func (ErrForbidden) Error ¶
func (e ErrForbidden) Error() string
Error returns a human-friendly error explanation
func (*ErrForbidden) IsNull ¶
func (e *ErrForbidden) IsNull() bool
IsNull tells if the instance is null
func (ErrForbidden) RootCause ¶
func (e ErrForbidden) RootCause() error
RootCause returns the initial error's cause
func (ErrForbidden) ToGRPCStatus ¶
func (e ErrForbidden) ToGRPCStatus() error
ToGRPCStatus returns a grpcstatus struct from error
func (*ErrForbidden) UnformattedError ¶
func (e *ErrForbidden) UnformattedError() string
UnformattedError returns Error() without any extra formatting applied
func (ErrForbidden) Unwrap ¶
func (e ErrForbidden) Unwrap() error
Unwrap implements the Wrapper interface
func (ErrForbidden) Valid ¶
func (e ErrForbidden) Valid() bool
Valid errorCore struct should be always created via newError constructor, if it doesn't we might miss e.lock initialization
func (*ErrForbidden) WithContext ¶
func (e *ErrForbidden) WithContext(ctx context.Context)
type ErrInconsistent ¶
type ErrInconsistent struct {
// contains filtered or unexported fields
}
ErrInconsistent is used when data used is ErrInconsistent
func InconsistentError ¶
func InconsistentError(msg ...interface{}) *ErrInconsistent
InconsistentError creates an ErrInconsistent error
func InconsistentErrorWithCause ¶
func InconsistentErrorWithCause(cause error, consequences []error, msg ...interface{}) *ErrInconsistent
InconsistentErrorWithCause creates an ErrInconsistent error
func (*ErrInconsistent) AddConsequence ¶
func (e *ErrInconsistent) AddConsequence(err error) Error
AddConsequence adds a consequence 'err' to current error 'e'
func (*ErrInconsistent) Annotate ¶
func (e *ErrInconsistent) Annotate(key string, value data.Annotation) data.Annotatable
Annotate adds an Annotation (key-value) pair to current error 'e', using the key 'key' and the value 'value'
func (ErrInconsistent) Annotation ¶
func (e ErrInconsistent) Annotation(key string) (data.Annotation, bool)
Annotation ...
func (ErrInconsistent) Annotations ¶
func (e ErrInconsistent) Annotations() data.Annotations
Annotations ...
func (ErrInconsistent) Cause ¶
func (e ErrInconsistent) Cause() error
Cause is just an accessor for internal e.cause
func (ErrInconsistent) Consequences ¶
func (e ErrInconsistent) Consequences() []error
Consequences returns the consequences of current error (detected teardown problems)
func (ErrInconsistent) Error ¶
func (e ErrInconsistent) Error() string
Error returns a human-friendly error explanation
func (*ErrInconsistent) IsNull ¶
func (e *ErrInconsistent) IsNull() bool
IsNull tells if the instance is null
func (ErrInconsistent) RootCause ¶
func (e ErrInconsistent) RootCause() error
RootCause returns the initial error's cause
func (ErrInconsistent) ToGRPCStatus ¶
func (e ErrInconsistent) ToGRPCStatus() error
ToGRPCStatus returns a grpcstatus struct from error
func (*ErrInconsistent) UnformattedError ¶
func (e *ErrInconsistent) UnformattedError() string
UnformattedError returns Error() without any extra formatting applied
func (ErrInconsistent) Unwrap ¶
func (e ErrInconsistent) Unwrap() error
Unwrap implements the Wrapper interface
func (ErrInconsistent) Valid ¶
func (e ErrInconsistent) Valid() bool
Valid errorCore struct should be always created via newError constructor, if it doesn't we might miss e.lock initialization
func (*ErrInconsistent) WithContext ¶
func (e *ErrInconsistent) WithContext(ctx context.Context)
type ErrInvalidInstance ¶
type ErrInvalidInstance struct {
// contains filtered or unexported fields
}
ErrInvalidInstance has to be used when a method is called from an instance equal to nil
func InvalidInstanceError ¶
func InvalidInstanceError() *ErrInvalidInstance
InvalidInstanceError creates an ErrInvalidInstance error
func InvalidInstanceErrorWithCause ¶
func InvalidInstanceErrorWithCause(cause error, consequences []error, msg ...interface{}) *ErrInvalidInstance
InvalidInstanceErrorWithCause creates an ErrInvalidInstance error
func (*ErrInvalidInstance) AddConsequence ¶
func (e *ErrInvalidInstance) AddConsequence(err error) Error
AddConsequence adds a consequence 'err' to current error 'e'
func (*ErrInvalidInstance) Annotate ¶
func (e *ErrInvalidInstance) Annotate(key string, value data.Annotation) data.Annotatable
Annotate adds an Annotation (key-value) pair to current error 'e', using the key 'key' and the value 'value'
func (ErrInvalidInstance) Annotation ¶
func (e ErrInvalidInstance) Annotation(key string) (data.Annotation, bool)
Annotation ...
func (ErrInvalidInstance) Annotations ¶
func (e ErrInvalidInstance) Annotations() data.Annotations
Annotations ...
func (ErrInvalidInstance) Cause ¶
func (e ErrInvalidInstance) Cause() error
Cause is just an accessor for internal e.cause
func (ErrInvalidInstance) Consequences ¶
func (e ErrInvalidInstance) Consequences() []error
Consequences returns the consequences of current error (detected teardown problems)
func (ErrInvalidInstance) Error ¶
func (e ErrInvalidInstance) Error() string
Error returns a human-friendly error explanation
func (*ErrInvalidInstance) IsNull ¶
func (e *ErrInvalidInstance) IsNull() bool
IsNull tells if the instance is null
func (ErrInvalidInstance) RootCause ¶
func (e ErrInvalidInstance) RootCause() error
RootCause returns the initial error's cause
func (ErrInvalidInstance) ToGRPCStatus ¶
func (e ErrInvalidInstance) ToGRPCStatus() error
ToGRPCStatus returns a grpcstatus struct from error
func (*ErrInvalidInstance) UnformattedError ¶
func (e *ErrInvalidInstance) UnformattedError() string
UnformattedError returns Error() without any extra formatting applied
func (ErrInvalidInstance) Unwrap ¶
func (e ErrInvalidInstance) Unwrap() error
Unwrap implements the Wrapper interface
func (ErrInvalidInstance) Valid ¶
func (e ErrInvalidInstance) Valid() bool
Valid errorCore struct should be always created via newError constructor, if it doesn't we might miss e.lock initialization
func (*ErrInvalidInstance) WithContext ¶
func (e *ErrInvalidInstance) WithContext(ctx context.Context)
type ErrInvalidInstanceContent ¶
type ErrInvalidInstanceContent struct {
// contains filtered or unexported fields
}
ErrInvalidInstanceContent has to be used when a property of an instance contains invalid property
func InvalidInstanceContentError ¶
func InvalidInstanceContentError(what, why string) *ErrInvalidInstanceContent
InvalidInstanceContentError returns an instance of ErrInvalidInstanceContent.
func InvalidInstanceContentErrorWithCause ¶
func InvalidInstanceContentErrorWithCause(cause error, consequences []error, what, why string, msg ...interface{}) *ErrInvalidInstanceContent
InvalidInstanceContentErrorWithCause returns an instance of ErrInvalidInstanceContent.
func (*ErrInvalidInstanceContent) AddConsequence ¶
func (e *ErrInvalidInstanceContent) AddConsequence(err error) Error
AddConsequence adds a consequence 'err' to current error 'e'
func (*ErrInvalidInstanceContent) Annotate ¶
func (e *ErrInvalidInstanceContent) Annotate(key string, value data.Annotation) data.Annotatable
Annotate adds an Annotation (key-value) pair to current error 'e', using the key 'key' and the value 'value'
func (ErrInvalidInstanceContent) Annotation ¶
func (e ErrInvalidInstanceContent) Annotation(key string) (data.Annotation, bool)
Annotation ...
func (ErrInvalidInstanceContent) Annotations ¶
func (e ErrInvalidInstanceContent) Annotations() data.Annotations
Annotations ...
func (ErrInvalidInstanceContent) Cause ¶
func (e ErrInvalidInstanceContent) Cause() error
Cause is just an accessor for internal e.cause
func (ErrInvalidInstanceContent) Consequences ¶
func (e ErrInvalidInstanceContent) Consequences() []error
Consequences returns the consequences of current error (detected teardown problems)
func (ErrInvalidInstanceContent) Error ¶
func (e ErrInvalidInstanceContent) Error() string
Error returns a human-friendly error explanation
func (*ErrInvalidInstanceContent) IsNull ¶
func (e *ErrInvalidInstanceContent) IsNull() bool
IsNull tells if the instance is null
func (ErrInvalidInstanceContent) RootCause ¶
func (e ErrInvalidInstanceContent) RootCause() error
RootCause returns the initial error's cause
func (ErrInvalidInstanceContent) ToGRPCStatus ¶
func (e ErrInvalidInstanceContent) ToGRPCStatus() error
ToGRPCStatus returns a grpcstatus struct from error
func (*ErrInvalidInstanceContent) UnformattedError ¶
func (e *ErrInvalidInstanceContent) UnformattedError() string
UnformattedError returns Error() without any extra formatting applied
func (ErrInvalidInstanceContent) Unwrap ¶
func (e ErrInvalidInstanceContent) Unwrap() error
Unwrap implements the Wrapper interface
func (ErrInvalidInstanceContent) Valid ¶
func (e ErrInvalidInstanceContent) Valid() bool
Valid errorCore struct should be always created via newError constructor, if it doesn't we might miss e.lock initialization
func (*ErrInvalidInstanceContent) WithContext ¶
func (e *ErrInvalidInstanceContent) WithContext(ctx context.Context)
type ErrInvalidParameter ¶
type ErrInvalidParameter struct {
// contains filtered or unexported fields
}
ErrInvalidParameter ...
func InvalidParameterCannotBeEmptyStringError ¶
func InvalidParameterCannotBeEmptyStringError(what string) *ErrInvalidParameter
InvalidParameterCannotBeEmptyStringError is a specialized *ErrInvalidParameter with message "cannot be empty string"
func InvalidParameterCannotBeNilError ¶
func InvalidParameterCannotBeNilError(what string) *ErrInvalidParameter
InvalidParameterCannotBeNilError is a specialized *ErrInvalidParameter with message "cannot be nil"
func InvalidParameterError ¶
func InvalidParameterError(what string, why ...interface{}) *ErrInvalidParameter
InvalidParameterError creates an ErrInvalidParameter error
func InvalidParameterErrorWithCauseAndConsequences ¶
func InvalidParameterErrorWithCauseAndConsequences(cause error, consequences []error, what string, skip uint, why ...interface{}) *ErrInvalidParameter
InvalidParameterErrorWithCauseAndConsequences creates an ErrInvalidParameter error
func (*ErrInvalidParameter) AddConsequence ¶
func (e *ErrInvalidParameter) AddConsequence(err error) Error
AddConsequence adds a consequence 'err' to current error 'e'
func (*ErrInvalidParameter) Annotate ¶
func (e *ErrInvalidParameter) Annotate(key string, value data.Annotation) data.Annotatable
Annotate adds an Annotation (key-value) pair to current error 'e', using the key 'key' and the value 'value'
func (ErrInvalidParameter) Annotation ¶
func (e ErrInvalidParameter) Annotation(key string) (data.Annotation, bool)
Annotation ...
func (ErrInvalidParameter) Annotations ¶
func (e ErrInvalidParameter) Annotations() data.Annotations
Annotations ...
func (ErrInvalidParameter) Cause ¶
func (e ErrInvalidParameter) Cause() error
Cause is just an accessor for internal e.cause
func (ErrInvalidParameter) Consequences ¶
func (e ErrInvalidParameter) Consequences() []error
Consequences returns the consequences of current error (detected teardown problems)
func (ErrInvalidParameter) Error ¶
func (e ErrInvalidParameter) Error() string
Error returns a human-friendly error explanation
func (*ErrInvalidParameter) IsNull ¶
func (e *ErrInvalidParameter) IsNull() bool
IsNull tells if the instance is null
func (ErrInvalidParameter) RootCause ¶
func (e ErrInvalidParameter) RootCause() error
RootCause returns the initial error's cause
func (ErrInvalidParameter) ToGRPCStatus ¶
func (e ErrInvalidParameter) ToGRPCStatus() error
ToGRPCStatus returns a grpcstatus struct from error
func (*ErrInvalidParameter) UnformattedError ¶
func (e *ErrInvalidParameter) UnformattedError() string
UnformattedError returns Error() without any extra formatting applied
func (ErrInvalidParameter) Unwrap ¶
func (e ErrInvalidParameter) Unwrap() error
Unwrap implements the Wrapper interface
func (ErrInvalidParameter) Valid ¶
func (e ErrInvalidParameter) Valid() bool
Valid errorCore struct should be always created via newError constructor, if it doesn't we might miss e.lock initialization
func (*ErrInvalidParameter) WithContext ¶
func (e *ErrInvalidParameter) WithContext(ctx context.Context)
type ErrInvalidRequest ¶
type ErrInvalidRequest struct {
// contains filtered or unexported fields
}
ErrInvalidRequest ...
func (*ErrInvalidRequest) AddConsequence ¶
func (e *ErrInvalidRequest) AddConsequence(err error) Error
AddConsequence adds a consequence 'err' to current error 'e'
func (*ErrInvalidRequest) Annotate ¶
func (e *ErrInvalidRequest) Annotate(key string, value data.Annotation) data.Annotatable
Annotate overloads errorCore.Annotate() to make sure the type returned is the same as the caller satisfies interface data.Annotatable
func (ErrInvalidRequest) Annotation ¶
func (e ErrInvalidRequest) Annotation(key string) (data.Annotation, bool)
Annotation ...
func (ErrInvalidRequest) Annotations ¶
func (e ErrInvalidRequest) Annotations() data.Annotations
Annotations ...
func (ErrInvalidRequest) Cause ¶
func (e ErrInvalidRequest) Cause() error
Cause is just an accessor for internal e.cause
func (ErrInvalidRequest) Consequences ¶
func (e ErrInvalidRequest) Consequences() []error
Consequences returns the consequences of current error (detected teardown problems)
func (ErrInvalidRequest) Error ¶
func (e ErrInvalidRequest) Error() string
Error returns a human-friendly error explanation
func (*ErrInvalidRequest) IsNull ¶
func (e *ErrInvalidRequest) IsNull() bool
IsNull tells if the instance is null
func (ErrInvalidRequest) RootCause ¶
func (e ErrInvalidRequest) RootCause() error
RootCause returns the initial error's cause
func (ErrInvalidRequest) ToGRPCStatus ¶
func (e ErrInvalidRequest) ToGRPCStatus() error
ToGRPCStatus returns a grpcstatus struct from error
func (*ErrInvalidRequest) UnformattedError ¶
func (e *ErrInvalidRequest) UnformattedError() string
UnformattedError returns Error() without any extra formatting applied
func (ErrInvalidRequest) Unwrap ¶
func (e ErrInvalidRequest) Unwrap() error
Unwrap implements the Wrapper interface
func (ErrInvalidRequest) Valid ¶
func (e ErrInvalidRequest) Valid() bool
Valid errorCore struct should be always created via newError constructor, if it doesn't we might miss e.lock initialization
func (*ErrInvalidRequest) WithContext ¶
func (e *ErrInvalidRequest) WithContext(ctx context.Context)
type ErrNotAuthenticated ¶
type ErrNotAuthenticated struct {
// contains filtered or unexported fields
}
ErrNotAuthenticated when action is done without being authenticated first
func NotAuthenticatedError ¶
func NotAuthenticatedError(msg ...interface{}) *ErrNotAuthenticated
NotAuthenticatedError creates an ErrNotAuthenticated error
func NotAuthenticatedErrorWithCause ¶
func NotAuthenticatedErrorWithCause(cause error, consequences []error, msg ...interface{}) *ErrNotAuthenticated
NotAuthenticatedErrorWithCause creates an ErrNotAuthenticated error
func (*ErrNotAuthenticated) AddConsequence ¶
func (e *ErrNotAuthenticated) AddConsequence(err error) Error
AddConsequence adds a consequence 'err' to current error 'e'
func (*ErrNotAuthenticated) Annotate ¶
func (e *ErrNotAuthenticated) Annotate(key string, value data.Annotation) data.Annotatable
Annotate adds an Annotation (key-value) pair to current error 'e', using the key 'key' and the value 'value'
func (ErrNotAuthenticated) Annotation ¶
func (e ErrNotAuthenticated) Annotation(key string) (data.Annotation, bool)
Annotation ...
func (ErrNotAuthenticated) Annotations ¶
func (e ErrNotAuthenticated) Annotations() data.Annotations
Annotations ...
func (ErrNotAuthenticated) Cause ¶
func (e ErrNotAuthenticated) Cause() error
Cause is just an accessor for internal e.cause
func (ErrNotAuthenticated) Consequences ¶
func (e ErrNotAuthenticated) Consequences() []error
Consequences returns the consequences of current error (detected teardown problems)
func (ErrNotAuthenticated) Error ¶
func (e ErrNotAuthenticated) Error() string
Error returns a human-friendly error explanation
func (*ErrNotAuthenticated) IsNull ¶
func (e *ErrNotAuthenticated) IsNull() bool
IsNull tells if the instance is null
func (ErrNotAuthenticated) RootCause ¶
func (e ErrNotAuthenticated) RootCause() error
RootCause returns the initial error's cause
func (ErrNotAuthenticated) ToGRPCStatus ¶
func (e ErrNotAuthenticated) ToGRPCStatus() error
ToGRPCStatus returns a grpcstatus struct from error
func (*ErrNotAuthenticated) UnformattedError ¶
func (e *ErrNotAuthenticated) UnformattedError() string
UnformattedError returns Error() without any extra formatting applied
func (ErrNotAuthenticated) Unwrap ¶
func (e ErrNotAuthenticated) Unwrap() error
Unwrap implements the Wrapper interface
func (ErrNotAuthenticated) Valid ¶
func (e ErrNotAuthenticated) Valid() bool
Valid errorCore struct should be always created via newError constructor, if it doesn't we might miss e.lock initialization
func (*ErrNotAuthenticated) WithContext ¶
func (e *ErrNotAuthenticated) WithContext(ctx context.Context)
type ErrNotAvailable ¶
type ErrNotAvailable struct {
// contains filtered or unexported fields
}
ErrNotAvailable resource not available error
func NotAvailableError ¶
func NotAvailableError(msg ...interface{}) *ErrNotAvailable
NotAvailableError creates an ErrNotAvailable error
func NotAvailableErrorWithCause ¶
func NotAvailableErrorWithCause(cause error, consequences []error, msg ...interface{}) *ErrNotAvailable
NotAvailableErrorWithCause creates an ErrNotAvailable error initialized with a cause 'cause'
func (*ErrNotAvailable) AddConsequence ¶
func (e *ErrNotAvailable) AddConsequence(err error) Error
AddConsequence adds a consequence 'err' to current error 'e'
func (*ErrNotAvailable) Annotate ¶
func (e *ErrNotAvailable) Annotate(key string, value data.Annotation) data.Annotatable
Annotate adds an Annotation (key-value) pair to current error 'e', using the key 'key' and the value 'value'
func (ErrNotAvailable) Annotation ¶
func (e ErrNotAvailable) Annotation(key string) (data.Annotation, bool)
Annotation ...
func (ErrNotAvailable) Annotations ¶
func (e ErrNotAvailable) Annotations() data.Annotations
Annotations ...
func (ErrNotAvailable) Cause ¶
func (e ErrNotAvailable) Cause() error
Cause is just an accessor for internal e.cause
func (ErrNotAvailable) Consequences ¶
func (e ErrNotAvailable) Consequences() []error
Consequences returns the consequences of current error (detected teardown problems)
func (ErrNotAvailable) Error ¶
func (e ErrNotAvailable) Error() string
Error returns a human-friendly error explanation
func (*ErrNotAvailable) IsNull ¶
func (e *ErrNotAvailable) IsNull() bool
IsNull tells if the instance is null
func (ErrNotAvailable) RootCause ¶
func (e ErrNotAvailable) RootCause() error
RootCause returns the initial error's cause
func (ErrNotAvailable) ToGRPCStatus ¶
func (e ErrNotAvailable) ToGRPCStatus() error
ToGRPCStatus returns a grpcstatus struct from error
func (*ErrNotAvailable) UnformattedError ¶
func (e *ErrNotAvailable) UnformattedError() string
UnformattedError returns Error() without any extra formatting applied
func (ErrNotAvailable) Unwrap ¶
func (e ErrNotAvailable) Unwrap() error
Unwrap implements the Wrapper interface
func (ErrNotAvailable) Valid ¶
func (e ErrNotAvailable) Valid() bool
Valid errorCore struct should be always created via newError constructor, if it doesn't we might miss e.lock initialization
func (*ErrNotAvailable) WithContext ¶
func (e *ErrNotAvailable) WithContext(ctx context.Context)
type ErrNotFound ¶
type ErrNotFound struct {
// contains filtered or unexported fields
}
ErrNotFound resource not found error
func NotFoundError ¶
func NotFoundError(msg ...interface{}) *ErrNotFound
NotFoundError creates an ErrNotFound error
func NotFoundErrorWithCause ¶
func NotFoundErrorWithCause(cause error, consequences []error, msg ...interface{}) *ErrNotFound
NotFoundErrorWithCause creates an ErrNotFound error initialized with cause 'cause'
func (*ErrNotFound) AddConsequence ¶
func (e *ErrNotFound) AddConsequence(err error) Error
AddConsequence adds a consequence 'err' to current error 'e'
func (*ErrNotFound) Annotate ¶
func (e *ErrNotFound) Annotate(key string, value data.Annotation) data.Annotatable
Annotate adds an Annotation (key-value) pair to current error 'e', using the key 'key' and the value 'value'
func (ErrNotFound) Annotation ¶
func (e ErrNotFound) Annotation(key string) (data.Annotation, bool)
Annotation ...
func (ErrNotFound) Annotations ¶
func (e ErrNotFound) Annotations() data.Annotations
Annotations ...
func (ErrNotFound) Cause ¶
func (e ErrNotFound) Cause() error
Cause is just an accessor for internal e.cause
func (ErrNotFound) Consequences ¶
func (e ErrNotFound) Consequences() []error
Consequences returns the consequences of current error (detected teardown problems)
func (ErrNotFound) Error ¶
func (e ErrNotFound) Error() string
Error returns a human-friendly error explanation
func (*ErrNotFound) IsNull ¶
func (e *ErrNotFound) IsNull() bool
IsNull tells if the instance is null
func (ErrNotFound) RootCause ¶
func (e ErrNotFound) RootCause() error
RootCause returns the initial error's cause
func (ErrNotFound) ToGRPCStatus ¶
func (e ErrNotFound) ToGRPCStatus() error
ToGRPCStatus returns a grpcstatus struct from error
func (*ErrNotFound) UnformattedError ¶
func (e *ErrNotFound) UnformattedError() string
UnformattedError returns Error() without any extra formatting applied
func (ErrNotFound) Unwrap ¶
func (e ErrNotFound) Unwrap() error
Unwrap implements the Wrapper interface
func (ErrNotFound) Valid ¶
func (e ErrNotFound) Valid() bool
Valid errorCore struct should be always created via newError constructor, if it doesn't we might miss e.lock initialization
func (*ErrNotFound) WithContext ¶
func (e *ErrNotFound) WithContext(ctx context.Context)
func (*ErrNotFound) WithCtx ¶
func (e *ErrNotFound) WithCtx(ctx context.Context) *ErrNotFound
type ErrNotImplemented ¶
type ErrNotImplemented struct {
// contains filtered or unexported fields
}
ErrNotImplemented ...
func NotImplementedError ¶
func NotImplementedError(msg ...interface{}) *ErrNotImplemented
NotImplementedError creates an ErrNotImplemented report
func (*ErrNotImplemented) AddConsequence ¶
func (e *ErrNotImplemented) AddConsequence(err error) Error
AddConsequence adds a consequence 'err' to current error 'e'
func (*ErrNotImplemented) Annotate ¶
func (e *ErrNotImplemented) Annotate(key string, value data.Annotation) data.Annotatable
Annotate adds an Annotation (key-value) pair to current error 'e', using the key 'key' and the value 'value'
func (ErrNotImplemented) Annotation ¶
func (e ErrNotImplemented) Annotation(key string) (data.Annotation, bool)
Annotation ...
func (ErrNotImplemented) Annotations ¶
func (e ErrNotImplemented) Annotations() data.Annotations
Annotations ...
func (ErrNotImplemented) Cause ¶
func (e ErrNotImplemented) Cause() error
Cause is just an accessor for internal e.cause
func (ErrNotImplemented) Consequences ¶
func (e ErrNotImplemented) Consequences() []error
Consequences returns the consequences of current error (detected teardown problems)
func (ErrNotImplemented) Error ¶
func (e ErrNotImplemented) Error() string
Error returns a human-friendly error explanation
func (*ErrNotImplemented) IsNull ¶
func (e *ErrNotImplemented) IsNull() bool
IsNull tells if the instance is null
func (ErrNotImplemented) RootCause ¶
func (e ErrNotImplemented) RootCause() error
RootCause returns the initial error's cause
func (ErrNotImplemented) ToGRPCStatus ¶
func (e ErrNotImplemented) ToGRPCStatus() error
ToGRPCStatus returns a grpcstatus struct from error
func (*ErrNotImplemented) UnformattedError ¶
func (e *ErrNotImplemented) UnformattedError() string
UnformattedError returns Error() without any extra formatting applied
func (ErrNotImplemented) Unwrap ¶
func (e ErrNotImplemented) Unwrap() error
Unwrap implements the Wrapper interface
func (ErrNotImplemented) Valid ¶
func (e ErrNotImplemented) Valid() bool
Valid errorCore struct should be always created via newError constructor, if it doesn't we might miss e.lock initialization
func (*ErrNotImplemented) WithContext ¶
func (e *ErrNotImplemented) WithContext(ctx context.Context)
type ErrOverflow ¶
type ErrOverflow struct {
// contains filtered or unexported fields
}
ErrOverflow is used when a limit is reached
func OverflowError ¶
func OverflowError(err error, limit uint, msg ...interface{}) *ErrOverflow
OverflowError creates an ErrOverflow error
func OverflowErrorWithCause ¶
func OverflowErrorWithCause(err error, limit uint, consequences []error, msg ...interface{}) *ErrOverflow
OverflowErrorWithCause creates an ErrOverflow error
func (*ErrOverflow) AddConsequence ¶
func (e *ErrOverflow) AddConsequence(err error) Error
AddConsequence adds a consequence 'err' to current error 'e'
func (*ErrOverflow) Annotate ¶
func (e *ErrOverflow) Annotate(key string, value data.Annotation) data.Annotatable
Annotate adds an Annotation (key-value) pair to current error 'e', using the key 'key' and the value 'value'
func (ErrOverflow) Annotation ¶
func (e ErrOverflow) Annotation(key string) (data.Annotation, bool)
Annotation ...
func (ErrOverflow) Annotations ¶
func (e ErrOverflow) Annotations() data.Annotations
Annotations ...
func (ErrOverflow) Cause ¶
func (e ErrOverflow) Cause() error
Cause is just an accessor for internal e.cause
func (ErrOverflow) Consequences ¶
func (e ErrOverflow) Consequences() []error
Consequences returns the consequences of current error (detected teardown problems)
func (ErrOverflow) Error ¶
func (e ErrOverflow) Error() string
Error returns a human-friendly error explanation
func (*ErrOverflow) IsNull ¶
func (e *ErrOverflow) IsNull() bool
IsNull tells if the instance is null
func (ErrOverflow) RootCause ¶
func (e ErrOverflow) RootCause() error
RootCause returns the initial error's cause
func (ErrOverflow) ToGRPCStatus ¶
func (e ErrOverflow) ToGRPCStatus() error
ToGRPCStatus returns a grpcstatus struct from error
func (*ErrOverflow) UnformattedError ¶
func (e *ErrOverflow) UnformattedError() string
UnformattedError returns Error() without any extra formatting applied
func (ErrOverflow) Unwrap ¶
func (e ErrOverflow) Unwrap() error
Unwrap implements the Wrapper interface
func (ErrOverflow) Valid ¶
func (e ErrOverflow) Valid() bool
Valid errorCore struct should be always created via newError constructor, if it doesn't we might miss e.lock initialization
func (*ErrOverflow) WithContext ¶
func (e *ErrOverflow) WithContext(ctx context.Context)
type ErrOverload ¶
type ErrOverload struct {
// contains filtered or unexported fields
}
ErrOverload when action cannot be honored because provider is overloaded (ie too many requests occurred in a given time).
func OverloadError ¶
func OverloadError(msg ...interface{}) *ErrOverload
OverloadError creates an ErrOverload error
func OverloadErrorWithCause ¶
func OverloadErrorWithCause(cause error, consequences []error, msg ...interface{}) *ErrOverload
OverloadErrorWithCause creates an ErrOverload error
func (*ErrOverload) AddConsequence ¶
func (e *ErrOverload) AddConsequence(err error) Error
AddConsequence adds a consequence 'err' to current error 'e'
func (*ErrOverload) Annotate ¶
func (e *ErrOverload) Annotate(key string, value data.Annotation) data.Annotatable
Annotate adds an Annotation (key-value) pair to current error 'e', using the key 'key' and the value 'value'
func (ErrOverload) Annotation ¶
func (e ErrOverload) Annotation(key string) (data.Annotation, bool)
Annotation ...
func (ErrOverload) Annotations ¶
func (e ErrOverload) Annotations() data.Annotations
Annotations ...
func (ErrOverload) Cause ¶
func (e ErrOverload) Cause() error
Cause is just an accessor for internal e.cause
func (ErrOverload) Consequences ¶
func (e ErrOverload) Consequences() []error
Consequences returns the consequences of current error (detected teardown problems)
func (ErrOverload) Error ¶
func (e ErrOverload) Error() string
Error returns a human-friendly error explanation
func (*ErrOverload) IsNull ¶
func (e *ErrOverload) IsNull() bool
IsNull tells if the instance is null
func (ErrOverload) RootCause ¶
func (e ErrOverload) RootCause() error
RootCause returns the initial error's cause
func (ErrOverload) ToGRPCStatus ¶
func (e ErrOverload) ToGRPCStatus() error
ToGRPCStatus returns a grpcstatus struct from error
func (*ErrOverload) UnformattedError ¶
func (e *ErrOverload) UnformattedError() string
UnformattedError returns Error() without any extra formatting applied
func (ErrOverload) Unwrap ¶
func (e ErrOverload) Unwrap() error
Unwrap implements the Wrapper interface
func (ErrOverload) Valid ¶
func (e ErrOverload) Valid() bool
Valid errorCore struct should be always created via newError constructor, if it doesn't we might miss e.lock initialization
func (*ErrOverload) WithContext ¶
func (e *ErrOverload) WithContext(ctx context.Context)
type ErrRuntimePanic ¶
type ErrRuntimePanic struct {
// contains filtered or unexported fields
}
ErrRuntimePanic ...
func RuntimePanicError ¶
func RuntimePanicError(pattern string, msg ...interface{}) *ErrRuntimePanic
RuntimePanicError creates an ErrRuntimePanic error
func RuntimePanicErrorWithCauseAndConsequences ¶
func RuntimePanicErrorWithCauseAndConsequences(cause error, consequences []error, overwrite bool, msg ...interface{}) *ErrRuntimePanic
RuntimePanicErrorWithCauseAndConsequences creates an ErrRuntimePanic error
func (*ErrRuntimePanic) AddConsequence ¶
func (e *ErrRuntimePanic) AddConsequence(err error) Error
AddConsequence adds a consequence 'err' to current error 'e'
func (*ErrRuntimePanic) Annotate ¶
func (e *ErrRuntimePanic) Annotate(key string, value data.Annotation) data.Annotatable
Annotate adds an Annotation (key-value) pair to current error 'e', using the key 'key' and the value 'value'
func (ErrRuntimePanic) Annotation ¶
func (e ErrRuntimePanic) Annotation(key string) (data.Annotation, bool)
Annotation ...
func (ErrRuntimePanic) Annotations ¶
func (e ErrRuntimePanic) Annotations() data.Annotations
Annotations ...
func (ErrRuntimePanic) Cause ¶
func (e ErrRuntimePanic) Cause() error
Cause is just an accessor for internal e.cause
func (ErrRuntimePanic) Consequences ¶
func (e ErrRuntimePanic) Consequences() []error
Consequences returns the consequences of current error (detected teardown problems)
func (ErrRuntimePanic) Error ¶
func (e ErrRuntimePanic) Error() string
Error returns a human-friendly error explanation
func (*ErrRuntimePanic) IsNull ¶
func (e *ErrRuntimePanic) IsNull() bool
IsNull tells if the instance is null
func (ErrRuntimePanic) RootCause ¶
func (e ErrRuntimePanic) RootCause() error
RootCause returns the initial error's cause
func (ErrRuntimePanic) ToGRPCStatus ¶
func (e ErrRuntimePanic) ToGRPCStatus() error
ToGRPCStatus returns a grpcstatus struct from error
func (*ErrRuntimePanic) UnformattedError ¶
func (e *ErrRuntimePanic) UnformattedError() string
UnformattedError returns Error() without any extra formatting applied
func (ErrRuntimePanic) Unwrap ¶
func (e ErrRuntimePanic) Unwrap() error
Unwrap implements the Wrapper interface
func (ErrRuntimePanic) Valid ¶
func (e ErrRuntimePanic) Valid() bool
Valid errorCore struct should be always created via newError constructor, if it doesn't we might miss e.lock initialization
func (*ErrRuntimePanic) WithContext ¶
func (e *ErrRuntimePanic) WithContext(ctx context.Context)
type ErrSyntax ¶
type ErrSyntax struct {
// contains filtered or unexported fields
}
ErrSyntax ...
func SyntaxError ¶
func SyntaxError(msg ...interface{}) *ErrSyntax
SyntaxError creates an ErrSyntax error
func SyntaxErrorWithCause ¶
SyntaxErrorWithCause creates an ErrSyntax error initialized with cause 'cause'
func (*ErrSyntax) AddConsequence ¶
AddConsequence adds a consequence 'err' to current error 'e'
func (*ErrSyntax) Annotate ¶
func (e *ErrSyntax) Annotate(key string, value data.Annotation) data.Annotatable
Annotate adds an Annotation (key-value) pair to current error 'e', using the key 'key' and the value 'value'
func (ErrSyntax) Annotation ¶
func (e ErrSyntax) Annotation(key string) (data.Annotation, bool)
Annotation ...
func (ErrSyntax) Cause ¶
func (e ErrSyntax) Cause() error
Cause is just an accessor for internal e.cause
func (ErrSyntax) Consequences ¶
func (e ErrSyntax) Consequences() []error
Consequences returns the consequences of current error (detected teardown problems)
func (ErrSyntax) Error ¶
func (e ErrSyntax) Error() string
Error returns a human-friendly error explanation
func (ErrSyntax) RootCause ¶
func (e ErrSyntax) RootCause() error
RootCause returns the initial error's cause
func (ErrSyntax) ToGRPCStatus ¶
func (e ErrSyntax) ToGRPCStatus() error
ToGRPCStatus returns a grpcstatus struct from error
func (*ErrSyntax) UnformattedError ¶
UnformattedError returns Error() without any extra formatting applied
func (ErrSyntax) Valid ¶
func (e ErrSyntax) Valid() bool
Valid errorCore struct should be always created via newError constructor, if it doesn't we might miss e.lock initialization
func (*ErrSyntax) WithContext ¶
type ErrTimeout ¶
type ErrTimeout struct {
// contains filtered or unexported fields
}
ErrTimeout defines a ErrTimeout error
func TimeoutError ¶
func TimeoutError(cause error, dur time.Duration, msg ...interface{}) *ErrTimeout
TimeoutError returns an ErrTimeout instance
func TimeoutErrorWithCauseAndConsequences ¶
func TimeoutErrorWithCauseAndConsequences(cause error, dur time.Duration, consequences []error, msg ...interface{}) *ErrTimeout
TimeoutErrorWithCauseAndConsequences returns an ErrTimeout instance
func (*ErrTimeout) AddConsequence ¶
func (e *ErrTimeout) AddConsequence(err error) Error
AddConsequence adds a consequence 'err' to current error 'e'
func (*ErrTimeout) Annotate ¶
func (e *ErrTimeout) Annotate(key string, value data.Annotation) data.Annotatable
Annotate adds an Annotation (key-value) pair to current error 'e', using the key 'key' and the value 'value'
func (ErrTimeout) Annotation ¶
func (e ErrTimeout) Annotation(key string) (data.Annotation, bool)
Annotation ...
func (ErrTimeout) Cause ¶
func (e ErrTimeout) Cause() error
Cause is just an accessor for internal e.cause
func (ErrTimeout) Consequences ¶
func (e ErrTimeout) Consequences() []error
Consequences returns the consequences of current error (detected teardown problems)
func (ErrTimeout) Error ¶
func (e ErrTimeout) Error() string
Error returns a human-friendly error explanation
func (ErrTimeout) RootCause ¶
func (e ErrTimeout) RootCause() error
RootCause returns the initial error's cause
func (ErrTimeout) ToGRPCStatus ¶
func (e ErrTimeout) ToGRPCStatus() error
ToGRPCStatus returns a grpcstatus struct from error
func (*ErrTimeout) UnformattedError ¶
func (e *ErrTimeout) UnformattedError() string
UnformattedError returns Error() without any extra formatting applied
func (ErrTimeout) Unwrap ¶
func (e ErrTimeout) Unwrap() error
Unwrap implements the Wrapper interface
func (ErrTimeout) Valid ¶
func (e ErrTimeout) Valid() bool
Valid errorCore struct should be always created via newError constructor, if it doesn't we might miss e.lock initialization
func (*ErrTimeout) WithContext ¶
func (e *ErrTimeout) WithContext(ctx context.Context)
type ErrUnknown ¶
type ErrUnknown struct {
// contains filtered or unexported fields
}
ErrUnknown is used when situation is unknown
func UnknownError ¶
func UnknownError(msg ...interface{}) *ErrUnknown
UnknownError creates an ErrUnknown error
func UnknownErrorWithCause ¶
func UnknownErrorWithCause(cause error, consequences []error, msg ...interface{}) *ErrUnknown
UnknownErrorWithCause creates an ErrUnknown error
func (*ErrUnknown) AddConsequence ¶
func (e *ErrUnknown) AddConsequence(err error) Error
AddConsequence adds a consequence 'err' to current error 'e'
func (*ErrUnknown) Annotate ¶
func (e *ErrUnknown) Annotate(key string, value data.Annotation) data.Annotatable
Annotate adds an Annotation (key-value) pair to current error 'e', using the key 'key' and the value 'value'
func (ErrUnknown) Annotation ¶
func (e ErrUnknown) Annotation(key string) (data.Annotation, bool)
Annotation ...
func (ErrUnknown) Cause ¶
func (e ErrUnknown) Cause() error
Cause is just an accessor for internal e.cause
func (ErrUnknown) Consequences ¶
func (e ErrUnknown) Consequences() []error
Consequences returns the consequences of current error (detected teardown problems)
func (ErrUnknown) Error ¶
func (e ErrUnknown) Error() string
Error returns a human-friendly error explanation
func (ErrUnknown) RootCause ¶
func (e ErrUnknown) RootCause() error
RootCause returns the initial error's cause
func (ErrUnknown) ToGRPCStatus ¶
func (e ErrUnknown) ToGRPCStatus() error
ToGRPCStatus returns a grpcstatus struct from error
func (*ErrUnknown) UnformattedError ¶
func (e *ErrUnknown) UnformattedError() string
UnformattedError returns Error() without any extra formatting applied
func (ErrUnknown) Unwrap ¶
func (e ErrUnknown) Unwrap() error
Unwrap implements the Wrapper interface
func (ErrUnknown) Valid ¶
func (e ErrUnknown) Valid() bool
Valid errorCore struct should be always created via newError constructor, if it doesn't we might miss e.lock initialization
func (*ErrUnknown) WithContext ¶
func (e *ErrUnknown) WithContext(ctx context.Context)
type ErrUnqualified ¶
type ErrUnqualified struct {
// contains filtered or unexported fields
}
ErrUnqualified is a generic Error type that has no particular signification
func (ErrUnqualified) AddConsequence ¶
AddConsequence adds an error 'err' to the list of consequences
func (ErrUnqualified) Annotate ¶
func (e ErrUnqualified) Annotate(key string, value data.Annotation) data.Annotatable
Annotate adds an Annotation (key-value) pair to current error 'e', using the key 'key' and the value 'value' satisfies interface data.Annotatable
func (ErrUnqualified) Annotation ¶
func (e ErrUnqualified) Annotation(key string) (data.Annotation, bool)
Annotation ...
func (ErrUnqualified) Annotations ¶
func (e ErrUnqualified) Annotations() data.Annotations
Annotations ...
func (ErrUnqualified) Cause ¶
func (e ErrUnqualified) Cause() error
Cause is just an accessor for internal e.cause
func (ErrUnqualified) Consequences ¶
func (e ErrUnqualified) Consequences() []error
Consequences returns the consequences of current error (detected teardown problems)
func (ErrUnqualified) Error ¶
func (e ErrUnqualified) Error() string
Error returns a human-friendly error explanation
func (ErrUnqualified) IsNull ¶
func (e ErrUnqualified) IsNull() bool
IsNull tells if the instance is to be considered as null value
func (ErrUnqualified) RootCause ¶
func (e ErrUnqualified) RootCause() error
RootCause returns the initial error's cause
func (ErrUnqualified) ToGRPCStatus ¶
func (e ErrUnqualified) ToGRPCStatus() error
ToGRPCStatus returns a grpcstatus struct from error
func (ErrUnqualified) UnformattedError ¶
func (e ErrUnqualified) UnformattedError() string
UnformattedError returns a human-friendly error explanation satisfies interface error
func (ErrUnqualified) Unwrap ¶
func (e ErrUnqualified) Unwrap() error
Unwrap implements the Wrapper interface
func (ErrUnqualified) Valid ¶
func (e ErrUnqualified) Valid() bool
Valid errorCore struct should be always created via newError constructor, if it doesn't we might miss e.lock initialization
func (ErrUnqualified) WithContext ¶
type ErrWarning ¶
type ErrWarning struct {
// contains filtered or unexported fields
}
ErrWarning defines an ErrWarning error
func WarningError ¶
func WarningError(cause error, msg ...interface{}) *ErrWarning
WarningError returns an ErrWarning instance
func WarningErrorWithCauseAndConsequences ¶
func WarningErrorWithCauseAndConsequences(cause error, consequences []error, msg ...interface{}) *ErrWarning
WarningErrorWithCauseAndConsequences return an ErrWarning instance
func (*ErrWarning) AddConsequence ¶
func (e *ErrWarning) AddConsequence(err error) Error
AddConsequence adds a consequence 'err' to current error 'e'
func (*ErrWarning) Annotate ¶
func (e *ErrWarning) Annotate(key string, value data.Annotation) data.Annotatable
Annotate adds an Annotation (key-value) pair to current error 'e', using the key 'key' and the value 'value'
func (ErrWarning) Annotation ¶
func (e ErrWarning) Annotation(key string) (data.Annotation, bool)
Annotation ...
func (ErrWarning) Cause ¶
func (e ErrWarning) Cause() error
Cause is just an accessor for internal e.cause
func (ErrWarning) Consequences ¶
func (e ErrWarning) Consequences() []error
Consequences returns the consequences of current error (detected teardown problems)
func (ErrWarning) Error ¶
func (e ErrWarning) Error() string
Error returns a human-friendly error explanation
func (ErrWarning) RootCause ¶
func (e ErrWarning) RootCause() error
RootCause returns the initial error's cause
func (ErrWarning) ToGRPCStatus ¶
func (e ErrWarning) ToGRPCStatus() error
ToGRPCStatus returns a grpcstatus struct from error
func (*ErrWarning) UnformattedError ¶
func (e *ErrWarning) UnformattedError() string
UnformattedError returns Error() without any extra formatting applied
func (ErrWarning) Unwrap ¶
func (e ErrWarning) Unwrap() error
Unwrap implements the Wrapper interface
func (ErrWarning) Valid ¶
func (e ErrWarning) Valid() bool
Valid errorCore struct should be always created via newError constructor, if it doesn't we might miss e.lock initialization
func (*ErrWarning) WithContext ¶
func (e *ErrWarning) WithContext(ctx context.Context)
type Error ¶
type Error interface { data.Annotatable error data.NullValue data.Validatable WithContext(context.Context) UnformattedError() string ToGRPCStatus() error // contains filtered or unexported methods }
Error defines the interface of a SafeScale error
func ConvertError ¶
ConvertError converts an error to a fail.Error
func FromGRPCStatus ¶
FromGRPCStatus translates GRPC status to error
func InvalidRequestError ¶
func InvalidRequestError(msg ...interface{}) Error
InvalidRequestError creates an ErrInvalidRequest error
func InvalidRequestErrorWithCause ¶
InvalidRequestErrorWithCause creates an ErrInvalidRequest error
func NewErrorListComplete ¶
func NewErrorWithCause ¶
NewErrorWithCause creates a new failure report with a cause
func NewErrorWithCauseAndConsequences ¶
NewErrorWithCauseAndConsequences creates a new failure report with a cause and a list of teardown problems 'consequences'
func NotImplementedErrorWithCauseAndConsequences ¶
func NotImplementedErrorWithCauseAndConsequences(cause error, consequences []error, msg ...interface{}) Error
NotImplementedErrorWithCauseAndConsequences creates an ErrNotImplemented report
type ErrorList ¶
type ErrorList struct {
// contains filtered or unexported fields
}
ErrorList ...
func (*ErrorList) AddConsequence ¶
AddConsequence ...
func (*ErrorList) Annotate ¶
func (el *ErrorList) Annotate(key string, value data.Annotation) data.Annotatable
Annotate ... satisfies interface data.Annotatable
func (ErrorList) Annotation ¶
func (e ErrorList) Annotation(key string) (data.Annotation, bool)
Annotation ...
func (ErrorList) Cause ¶
func (e ErrorList) Cause() error
Cause is just an accessor for internal e.cause
func (ErrorList) Consequences ¶
func (e ErrorList) Consequences() []error
Consequences returns the consequences of current error (detected teardown problems)
func (ErrorList) IsNull ¶
func (e ErrorList) IsNull() bool
IsNull tells if the instance is to be considered as null value
func (ErrorList) RootCause ¶
func (e ErrorList) RootCause() error
RootCause returns the initial error's cause
func (*ErrorList) ToErrorSlice ¶
ToErrorSlice transforms ErrorList to []error
func (ErrorList) ToGRPCStatus ¶
ToGRPCStatus returns a grpcstatus struct from ErrorList
func (*ErrorList) UnformattedError ¶
UnformattedError returns Error() without any extra formatting applied
func (ErrorList) Valid ¶
func (e ErrorList) Valid() bool
Valid errorCore struct should be always created via newError constructor, if it doesn't we might miss e.lock initialization