errors

package
v0.0.0-...-6fb8895 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2020 License: Apache-2.0 Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(e1 error, e2 error) bool

Contains inspects if e2 error is contained in any layer of e1 error

func Wrap

func Wrap(wrapper error, err error) error

Wrap returns an Error that wrap err with wrapper

Types

type Error

type Error interface {

	// Error implements the error interface.
	Error() string

	// Msg returns error message
	Msg() string

	// Err returns wrapped error
	Err() Error
}

Error specifies an API that must be fullfiled by error type

func New

func New(text string) Error

New returns an Error that formats as the given text.

Jump to

Keyboard shortcuts

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