uerror

package
v0.0.0-...-3d1188e Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Is

func Is(err error, code *ErrorCode) bool

func Unmarshal

func Unmarshal(str string) (code, msg string, ok bool)

Types

type ErrorCode

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

func NewErrorCode

func NewErrorCode(t int, c int, m string) *ErrorCode

func UnmarshalErrorCode

func UnmarshalErrorCode(str string) (*ErrorCode, bool)

func (*ErrorCode) Code

func (ec *ErrorCode) Code() string

func (*ErrorCode) Errorf

func (ec *ErrorCode) Errorf(a ...any) *UError

type UError

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

func UnmarshalUError

func UnmarshalUError(str string) (*UError, bool)

func (*UError) Code

func (ue *UError) Code() string

func (*UError) Error

func (ue *UError) Error() string

func (*UError) Is

func (ue *UError) Is(target error) bool

func (*UError) IsErrorCode

func (ue *UError) IsErrorCode(code *ErrorCode) bool

func (*UError) String

func (ue *UError) String() string

func (*UError) Unwrap

func (ue *UError) Unwrap() error

func (*UError) WithParamList

func (ue *UError) WithParamList(a ...any)

func (*UError) Wrap

func (ue *UError) Wrap(err error)

Jump to

Keyboard shortcuts

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