Documentation
¶
Index ¶
- func IsInternalError(err error) bool
- func IsUserError(err error) bool
- func WrapPanic(f func())
- type DefaultUserError
- type ErrorNote
- type ErrorNotes
- type ExternalError
- type ExternalNonError
- type HasPrefix
- type InternalError
- type MemoryError
- type ParentError
- type SecondaryError
- type UnexpectedError
- type UserError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsInternalError ¶
func IsUserError ¶
Types ¶
type DefaultUserError ¶
type DefaultUserError struct {
Err error
}
func NewDefaultUserError ¶
func NewDefaultUserError(message string, arg ...any) DefaultUserError
func (DefaultUserError) Error ¶
func (e DefaultUserError) Error() string
func (DefaultUserError) IsUserError ¶
func (DefaultUserError) IsUserError()
func (DefaultUserError) Unwrap ¶
func (e DefaultUserError) Unwrap() error
type ErrorNotes ¶
type ErrorNotes interface {
ErrorNotes() []ErrorNote
}
type ExternalError ¶
type ExternalError struct {
Recovered error
}
func GetExternalError ¶
func GetExternalError(err error) (ExternalError, bool)
func NewExternalError ¶
func NewExternalError(recovered error) ExternalError
func NewExternalNonError ¶
func NewExternalNonError(recovered error) ExternalError
func (ExternalError) Error ¶
func (e ExternalError) Error() string
func (ExternalError) Unwrap ¶
func (e ExternalError) Unwrap() error
type ExternalNonError ¶
type ExternalNonError struct {
Recovered any
}
func (ExternalNonError) Error ¶
func (e ExternalNonError) Error() string
type InternalError ¶
type InternalError interface { error IsInternalError() }
func NewUnreachableError ¶
func NewUnreachableError() InternalError
type MemoryError ¶
type MemoryError struct {
Err error
}
func (MemoryError) Error ¶
func (e MemoryError) Error() string
func (MemoryError) IsUserError ¶
func (MemoryError) IsUserError()
func (MemoryError) Unwrap ¶
func (e MemoryError) Unwrap() error
type ParentError ¶
type SecondaryError ¶
type SecondaryError interface {
SecondaryError() string
}
type UnexpectedError ¶
func NewUnexpectedError ¶
func NewUnexpectedError(message string, arg ...any) UnexpectedError
func NewUnexpectedErrorFromCause ¶
func NewUnexpectedErrorFromCause(err error) UnexpectedError
func (UnexpectedError) Error ¶
func (e UnexpectedError) Error() string
func (UnexpectedError) IsInternalError ¶
func (UnexpectedError) IsInternalError()
func (UnexpectedError) Unwrap ¶
func (e UnexpectedError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.