errors

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: AGPL-3.0 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 tmaic.V) string

func ErrPrintln

func ErrPrintln(err error, fields tmaic.V)

Types

type CodeError

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

func FromError

func FromError(err error) *CodeError

func NewError

func NewError(code int, text string) *CodeError

func NewErrorData

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

func NewErrorMsg

func NewErrorMsg(text string) *CodeError

func (*CodeError) Error

func (e *CodeError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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