xerror

package
v0.1.16 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTag = struct {
	UnknownTypeCode string
}{
	"errors.unknown_type",
}

ErrTag err tags

View Source
var ErrUnknownType = errors.New("unknown type error")

ErrUnknownType error

Functions

func Assert

func Assert()

Assert errors

func AssertFn

func AssertFn(fn reflect.Value) error

AssertFn errors

func Debug

func Debug()

Debug errors

func ErrHandle

func ErrHandle(err interface{}, fn ...func(err *Err))

ErrHandle errors

func ErrLog

func ErrLog(err interface{})

ErrLog errors

func ErrTagRegistry

func ErrTagRegistry(tags ...interface{})

ErrTagRegistry errors

func ErrTags

func ErrTags() map[string]bool

ErrTags get error tags

func ErrTagsMatch

func ErrTagsMatch(tag string) bool

ErrTagsMatch check error tags

func Panic

func Panic(err interface{})

Panic bool assert

func PanicErr

func PanicErr(d1 interface{}, err error) interface{}

PanicErr

func PanicM

func PanicM(err interface{}, msg string, args ...interface{})

PanicM error assert

func PanicMM

func PanicMM(err interface{}, fn func(err *Err))

PanicMM error assert

func PanicT

func PanicT(b bool, msg string, args ...interface{})

PanicT error assert

func PanicTT

func PanicTT(b bool, fn func(err *Err))

PanicTT bool assert

func Resp

func Resp(fn func(err *Err))

Resp errors

func RespErr

func RespErr(err *error)

RespErr errors

func Wrap

func Wrap(err interface{}, msg string, args ...interface{}) error

Wrap error wrap

func WrapM

func WrapM(err interface{}, fn func(err *Err)) error

WrapM error wrap

Types

type Err

type Err struct {
	// contains filtered or unexported fields
}

Err errors

func (*Err) Caller

func (t *Err) Caller(caller string)

Caller errors

func (*Err) Err

func (t *Err) Err() error

Err errors

func (*Err) Error

func (t *Err) Error() string

func (*Err) M

func (t *Err) M(k string, v interface{})

M errors

func (*Err) Msg

func (t *Err) Msg(msg string, args ...interface{})

Msg errors

func (*Err) P

func (t *Err) P() string

P errors

func (*Err) SetTag

func (t *Err) SetTag(tag string)

SetTag errors

func (*Err) StackTrace

func (t *Err) StackTrace() map[string]interface{}

StackTrace errors

func (*Err) Tag

func (t *Err) Tag() string

Tag errors

Jump to

Keyboard shortcuts

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