errors

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KindBadRequest    = http.StatusBadRequest
	KindUnexpected    = http.StatusInternalServerError
	KindAlreadyExists = http.StatusConflict
)

Kind enums

Variables

This section is empty.

Functions

func E

func E(op Op, args ...interface{}) error

func Expect

func Expect(err error, kinds ...int) logrus.Level

func Is

func Is(err error, kind int) bool

func Kind

func Kind(err error) int

func KindText

func KindText(err Error) string

func Severity

func Severity(err error) logrus.Level

Types

type Error

type Error struct {
	Kind     int
	Op       Op
	Err      error
	Severity logrus.Level
}

func (Error) Error

func (e Error) Error() string

type Op

type Op string

func Ops

func Ops(err Error) []Op

func (Op) String

func (o Op) String() string

Jump to

Keyboard shortcuts

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