errors

package
v0.2.13 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cfg = struct {
	MaxObj        uint8
	MaxRetryDur   time.Duration
	Debug         bool
	Stack         bool
	SkipErrorFile bool
}{
	Debug:         false,
	Stack:         false,
	SkipErrorFile: false,
	MaxObj:        15,
	MaxRetryDur:   time.Hour * 24,
}

Cfg config

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 errors

func PanicErr added in v0.1.10

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

PanicErr check error

func PanicM

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

PanicM errors

func PanicMM

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

PanicMM errors

func PanicT

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

PanicT errors

func PanicTT

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

PanicTT errors

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 errors

func WrapM

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

WrapM errors

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