itferr

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsErrEqual

func IsErrEqual(err1, err2 error) bool

func IsItfErr

func IsItfErr(err error) bool

Types

type MapItfErr added in v1.2.1

type MapItfErr interface {
	error
	Is(error) bool
	Wrap(error) MapItfErr
	Code() MapItfErrorCode
	String() string
	IsErrEqual(err error) bool
}

type MapItfError

type MapItfError struct {
	ErrCode  MapItfErrorCode
	Location string
	Err      error
	ErrMsg   string
}

func NewBaseTypeConvErr

func NewBaseTypeConvErr(locate string, msg string, err error) *MapItfError

func NewConvFailed

func NewConvFailed(locate string) *MapItfError

func NewConvFailedX added in v1.2.1

func NewConvFailedX(locate string, msg string, err error) *MapItfError

func NewCurrentCannotUseIndex

func NewCurrentCannotUseIndex(locate string) *MapItfError

func NewFuncUsedErr

func NewFuncUsedErr(locate, msg string) *MapItfError

func NewGetFuncTypeInconsistent

func NewGetFuncTypeInconsistent(locate string) *MapItfError

func NewIllegalMapObject

func NewIllegalMapObject(locate string) *MapItfError

func NewKeyNotFoundFailed

func NewKeyNotFoundFailed(locate string) *MapItfError

func NewKeyTypeErr

func NewKeyTypeErr(locate string) *MapItfError

func NewListIndexIllegal

func NewListIndexIllegal(locate string) *MapItfError

func NewMapItfErr

func NewMapItfErr(locate string, code MapItfErrorCode, msg string, err error) *MapItfError

NewMapItfErr method,code必填,msg,err选填

func NewMapItfErrX

func NewMapItfErrX(locate string, code MapItfErrorCode) *MapItfError

NewMapItfErrX 精简版

func NewParamTypeErr

func NewParamTypeErr(locate string) *MapItfError

func NewSetValueErr added in v1.2.1

func NewSetValueErr(locate string, msg string, err error) *MapItfError

func NewTypeMismatchErr

func NewTypeMismatchErr(locate string) *MapItfError

func NewUnSupportInterfaceFunc

func NewUnSupportInterfaceFunc(locate string) *MapItfError

func NewUnSupportSetValErr added in v1.2.1

func NewUnSupportSetValErr(locate string, msg string, err error) *MapItfError

func NewValueTypeErr

func NewValueTypeErr(locate string) *MapItfError

func (*MapItfError) Code added in v1.2.1

func (mie *MapItfError) Code() MapItfErrorCode

func (*MapItfError) Error

func (mie *MapItfError) Error() string

func (*MapItfError) Is added in v1.2.1

func (mie *MapItfError) Is(err error) bool

func (*MapItfError) IsErrEqual added in v1.2.1

func (mie *MapItfError) IsErrEqual(err2 error) bool

func (*MapItfError) String

func (mie *MapItfError) String() string

func (*MapItfError) Wrap added in v1.2.1

func (mie *MapItfError) Wrap(err error) MapItfErr

type MapItfErrorCode

type MapItfErrorCode int
const (
	UnknownErr       MapItfErrorCode = -1
	InitParseFailed  MapItfErrorCode = 1001
	InitParamTypeErr MapItfErrorCode = 2001
	ExceptObject     MapItfErrorCode = 2002

	KeyTypeErr              MapItfErrorCode = 3001
	ValueTypeErr            MapItfErrorCode = 3002
	ValueConvertFailed      MapItfErrorCode = 3003
	BaseTypeConvertFailed   MapItfErrorCode = 3004
	KeyNotFound             MapItfErrorCode = 3005
	GetFuncTypeInconsistent MapItfErrorCode = 3006
	IllegalMapObject        MapItfErrorCode = 3007
	EmptyMapObject          MapItfErrorCode = 3008

	ListIndexIllegal MapItfErrorCode = 4001

	UnSupportInterfaceFunc MapItfErrorCode = 5001
	CurrentCannotUseIndex  MapItfErrorCode = 5002
	TypeMismatchErr        MapItfErrorCode = 5003
	FuncUsedErr            MapItfErrorCode = 5004
	UnrecoverablePanicErr  MapItfErrorCode = 5005

	SetValueErr              MapItfErrorCode = 6001
	UnSupportSetValTypeErr   MapItfErrorCode = 6002
	IterChainIsEmpty         MapItfErrorCode = 6003
	IterChainPreElementIsNil MapItfErrorCode = 6004
)

func GetErrCode

func GetErrCode(err error) MapItfErrorCode

func (MapItfErrorCode) String

func (i MapItfErrorCode) String() string

Jump to

Keyboard shortcuts

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