apperr

package
v2.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Unwrap added in v2.2.0

func Unwrap(err error) error

Types

type Error

type Error struct {
	Cause   error
	Context any
	Message string
}

func (*Error) Error

func (e *Error) Error() string

func (*Error) Fmt

func (e *Error) Fmt(str ...any) *Error

Fmt calls fmt.Sprintf on the error message.

func (*Error) Unwrap

func (e *Error) Unwrap() error

Unwrap is used to make it work with errors.Is, errors.As.

func (*Error) WithCtx

func (e *Error) WithCtx(ctx any) *Error

func (*Error) Wrap

func (e *Error) Wrap(err error) *Error

Wrap associates the underlying error.

Jump to

Keyboard shortcuts

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