errors

package
v0.0.49 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 3 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Is

func Is(e error, err error) bool

Types

type Error

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

func New

func New(text string) *Error

New 新建一个错误 可传入一下参数: text : 文本字符串

func NewError

func NewError(args ...interface{}) *Error

NewError 新建一个错误 可传入一下参数: text : 文本字符串 code : 错误码 error: 原生错误

func (*Error) Code

func (e *Error) Code() int32

Code 返回错误码

func (*Error) Error added in v0.0.23

func (e *Error) Error() (text string)

func (*Error) ErrorWithArgs added in v0.0.23

func (e *Error) ErrorWithArgs(args ...interface{}) (text string)

func (*Error) Is

func (e *Error) Is(err error) bool

func (*Error) Next

func (e *Error) Next() error

Next 返回下一个错误

Jump to

Keyboard shortcuts

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