errors

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2020 License: MIT Imports: 0 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CausedBy

func CausedBy(err, cause error) bool

CausedBy checks if an error was caused by another

func New

func New(message string) error

New returns an error with the supplied message.

func Unwrap

func Unwrap(err error) error

Unwrap returns the next error in the error chain. If there is no next error, Unwrap returns nil.

func Wrap

func Wrap(err, cause error) error

Wrap an error with a cause

Types

type Error

type Error string

func (Error) Error

func (e Error) Error() string

Error prints the error's message

Jump to

Keyboard shortcuts

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