runtimeerrors

package
v0.0.0-...-c1b5198 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInternalError

func IsInternalError(err error) bool

func IsUserError

func IsUserError(err error) bool

func WrapPanic

func WrapPanic(f func())

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 ErrorNote

type ErrorNote interface {
	Message() string
}

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 HasPrefix

type HasPrefix interface {
	Prefix() 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 ParentError interface {
	error
	ChildErrors() []error
}

type SecondaryError

type SecondaryError interface {
	SecondaryError() string
}

type UnexpectedError

type UnexpectedError struct {
	Err   error
	Stack []byte
}

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

type UserError

type UserError interface {
	error
	IsUserError()
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL