errors

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorNotLogin = NewError(1, "请先登录")
)

Functions

func ErrPrint

func ErrPrint(err error, startFrom int, fields toto.V) string

func ErrPrintln

func ErrPrintln(err error, fields toto.V)

Types

type CodeError added in v1.0.5

type CodeError struct {
	Code    int
	Message string
	Data    interface{}
}

func FromError added in v1.0.5

func FromError(err error) *CodeError

func NewError added in v1.0.5

func NewError(code int, text string) *CodeError

func NewErrorData added in v1.0.5

func NewErrorData(code int, text string, data interface{}) *CodeError

func NewErrorMsg added in v1.0.5

func NewErrorMsg(text string) *CodeError

func (*CodeError) Error added in v1.0.5

func (e *CodeError) Error() string

Jump to

Keyboard shortcuts

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