errors

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSystemError

func IsSystemError(err error) bool

IsSystemError will unwrap err to the innermost error value and return whether it is a SystemError.

func IsUserError

func IsUserError(err error) bool

IsUserError will unwrap err to the innermost error value and return whether it is a UserError.

func SystemError

func SystemError(err error) error

SystemError annotates err in such a way that IsSystemError() can be used further up in the callstack. If err is a wrapped error, the root error will be unwrapped, annotated and rewrapped instead. The root error stack trace is preserved but any middle ones are lost.

func UserError

func UserError(err error) error

UserError annotates err in such a way that IsUserError() can be used further up in the callstack. If err is a wrapped error, the root error will be unwrapped, annotated and rewrapped instead. The root error stack trace is preserved but any middle ones are lost.

Types

This section is empty.

Jump to

Keyboard shortcuts

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