Documentation
¶
Index ¶
- Constants
- Variables
- func As[T any](err error) (T, bool)
- func Assert(cond bool, errs ...error)
- func Detail(err error, details D) error
- func Details(err error) iter.Seq2[string, any]
- func ErrOf(errorable any) error
- func Is(err error, target error) bool
- func Join(errs ...error) (err error)
- func Must[T any](value T, err error) T
- func New[T comparable](value T) error
- func Throw(err error)
- func Try(fn func()) (recovered any)
- func Unwrap(err error) error
- func UnwrapAll(err error) []error
- func Wrap(newWrapperError, originalError error) error
- type D
- type Detailed
- type Result
- type UnwrapError
- type UnwrapErrors
Constants ¶
View Source
const UNREACHABLE = "UNREACHABLE"
Variables ¶
View Source
var ErrAssertionFailed = errors.New("assertion failed")
Functions ¶
func New ¶
func New[T comparable](value T) error
Types ¶
type UnwrapError ¶
type UnwrapError interface {
Unwrap() error
}
type UnwrapErrors ¶
type UnwrapErrors interface {
Unwrap() []error
}
Click to show internal directories.
Click to hide internal directories.