errors

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2020 License: MIT Imports: 5 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Core

func Core(err error) error

Core returns wrapped error

func SwitchTrace

func SwitchTrace(on bool)

SwitchTrace switchs trace on/off

func Throw

func Throw(text string) error

Throw throws an error which contains stack information

func Wrap

func Wrap(err error) error

Wrap wraps another error

Types

type Error

type Error string

Error aliases string

func (Error) Error

func (e Error) Error() string

type ErrorCode

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

func (ErrorCode) Code

func (err ErrorCode) Code() Status

func (ErrorCode) Error

func (err ErrorCode) Error() string

func (ErrorCode) Print

func (err ErrorCode) Print(msg string) ErrorCode

func (ErrorCode) Printf

func (err ErrorCode) Printf(format string, args ...interface{}) ErrorCode

type ErrorList

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

func (*ErrorList) Add

func (list *ErrorList) Add(err error)

func (*ErrorList) Err

func (list *ErrorList) Err() error

func (*ErrorList) Error

func (list *ErrorList) Error() string

func (*ErrorList) Len

func (list *ErrorList) Len() int

func (*ErrorList) Sort

func (list *ErrorList) Sort(less func(error, error) bool)

type Status

type Status int
const StatusInvalid Status = -65535

func Code

func Code(err error) Status

func (Status) Print

func (status Status) Print(msg string) ErrorCode

func (Status) Printf

func (status Status) Printf(format string, args ...interface{}) ErrorCode

Jump to

Keyboard shortcuts

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