errors

package
v2.32.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func E

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

func IsKind

func IsKind(want Kind, err error) bool

Types

type ErrLocation

type ErrLocation struct {
	File string
	Line int
}

func GetLocation added in v2.20.0

func GetLocation(err error) ErrLocation

func (ErrLocation) String added in v2.20.0

func (l ErrLocation) String() string

type Error

type Error struct {
	// Op is the operation being performed
	// this can be named by convention as packageName.FunctionName
	// eg: var op = "errors.E"
	// for methods on structs this can be packageName.structName.methodName
	Op       Op
	Kind     Kind
	Err      error
	Location ErrLocation
}

func (*Error) Error

func (e *Error) Error() string

func (Error) Unwrap

func (e Error) Unwrap() error

type HRE

type HRE string

type Kind

type Kind uint16
const (
	KindOther Kind = iota + 1
	KindInternal
	KindHasuraAPI
	KindBadInput
	KindNetwork
)

func GetKind

func GetKind(err error) Kind

func (Kind) String

func (k Kind) String() string

type Op

type Op string

func Ops

func Ops(err *Error) []Op

type Unwrapper

type Unwrapper interface {
	Unwrap() error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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