errors

package
v0.0.0-...-a051025 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CauseOf

func CauseOf(err, rootErr error) error

CauseOf will return the error that caused the returned error. This can be used when multierr package is used or fmt.Errorf("%w: %w", ErrFront, cause) from standard library is used, and we know the front error.

func Is

func Is(err, target error) bool

Is reports whether any error in err's chain matches target.

An error is considered to match a target if it is equal to that target or if it implements a method Is(error) bool such that Is(target) returns true.

func New

func New(msg string) error

New returns a new error annotated with stack trace at the point New is called.

Types

This section is empty.

Jump to

Keyboard shortcuts

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