errutl

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: MulanPSL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cause

func Cause(err error) error

Cause 返回最原始的错误,可用来断言

func CheckErr

func CheckErr(err error)

func New

func New(format string, args ...interface{}) error

func Wrap

func Wrap(err error) error

Wrap 平时返回错误使用这个方法进行包装

func WrapSkip

func WrapSkip(err error, skip int) error

func WrapSkipWithMsg

func WrapSkipWithMsg(err error, skip int, format string, args ...interface{}) error

func WrapWithMsg

func WrapWithMsg(err error, format string, args ...interface{}) error

WrapWithMsg 平时返回错误使用这个方法进行包装

Types

type Errors

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

func NewErrs

func NewErrs(err ...error) *Errors

func (*Errors) Append

func (e *Errors) Append(err ...error)

func (*Errors) Error

func (e *Errors) Error() string

func (*Errors) IsNil

func (e *Errors) IsNil() bool

func (*Errors) IsNotNil

func (e *Errors) IsNotNil() bool

func (*Errors) Write

func (e *Errors) Write(msg string, args ...interface{})

Jump to

Keyboard shortcuts

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