error

package
v2.1.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2020 License: MIT Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error interface {
	// Error implements error.
	Error() string

	// Has tests to see if the test error exists anywhere in the error
	// stack.
	Has(error) bool

	// Is tests to see if the test error matches most recent error in the
	// stack.
	Is(error) bool
}

Error defines a robust error stack interface.

type ErrorCaller

type ErrorCaller interface {
	// Caller returns the associated Caller instance.
	Caller() std_caller.Caller
}

ErrorCaller is the interface implemented by error types that can expose caller information about themselves.

type ErrorWrapper

type ErrorWrapper interface {
	// WrapE returns the given error as a wrapper around the receiver.
	WrapE(error) error
}

type Unwrapper

type Unwrapper interface {
	// Unwrap returns the wrapped error, if any, otherwise nil.
	Unwrap() error
}

type Wrapper added in v2.1.0

type Wrapper interface {
	// Wrap returns a new error defined by string that wraps the receiver.
	Wrap(string) error
}

Jump to

Keyboard shortcuts

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