# Packages
Package terrorz provides test fixtures for the "errorz" package.
# Functions
As provides a more handy implementation of [errors.As] using generics.
Assertf is like [MustErrorf] if cond is false, does nothing otherwise.
Catch0 catches panics in a "func() error" closure.
Catch0Ctx catches panics in a "func(context.Context) error" closure.
Catch1 catches panics in a "func() (T, error)" closure.
Catch1Ctx catches panics in a "func(context.Context) (T, error)" closure.
Catch2 catches panics in a "func() (T1, T2, error)" closure.
Catch2Ctx catches panics in a "func(context.Context) (T1, T2, error)" closure.
Catch3 catches panics in a "func() (T1, T2, T3, error)" closure.
Catch3Ctx catches panics in a "func(context.Context) (T1, T2, T3, error)" closure.
Errorf creates an error and wraps it.
GetFrames returns the frames from the error, or the current frames the error is not wrapped or is nil.
GetSummary returns a summary of the error.
IgnoreClose calls [io.Closer.Close], ignoring the returned error.
MaybeGetMetadata tries to get the given metadata key from the error.
MaybeMustWrap is like [MustWrap], but does nothing if called with a nil error.
MaybeSetMetadata sets the given metadata (k, v) on the error if it has been wrapped, does nothing otherwise.
MaybeWrap is like [Wrap], but returns nil if called with a nil error.
MaybeWrapRecover is like [WrapRecover] but returns nil if called with a nil value.
MustClose calls [io.Closer.Close], panicking in case of error.
MustErrorf is like [Errorf] but panics with the wrapped error instead of returning it.
MustGetMetadata gets the given metadata key from the error, panics if not found or wrong type.
MustWrap is like [Wrap], but panics with the wrapped error instead of returning it.
NewFrame initializes a new frame.
SDump converts the error to a string representation for debug purposes.
Unwrap is similar to [errors.Unwrap] but works for errors implementing either [UnwrapSingle] and [UnwrapMulti].
Wrap wraps the given errors.
WrapRecover takes a recovered value and converts it to a wrapped error.
# Interfaces
ErrorDetails can be implemented by errors to export some additional, human-readable information about the error.
ErrorHTTPStatus can be implemented by errors to attach an HTTP status to themselves.
ErrorName can be implemented by errors to return a name different from their Go type.
UnwrapMulti describes a method which returns multiple errors.
UnwrapSingle describes a method which returns a single error.
# Type aliases
Frames describes a stack of frames.