fserr

package module
v0.2.4-alpha Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

README

fserr

方是错误封装

Documentation

Index

Constants

View Source
const (
	ErrUnknownCode      uint32 = 0x00000001
	ErrParamCode        uint32 = 0x00000002
	ErrConflictCode     uint32 = 0x00000003
	ErrNotExistCode     uint32 = 0x00000004
	ErrTypeTransferCode uint32 = 0x00000005
	ErrAuthCode         uint32 = 0x00000006
	ErrDataCode         uint32 = 0x00000007
	ErrCustomCode       uint32 = 0x00001000
)

Variables

This section is empty.

Functions

func ExplainCode

func ExplainCode(code uint32) string

Types

type Error

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

func NewAuthError

func NewAuthError(message string) *Error

func NewConflictError

func NewConflictError(message string) *Error

func NewCustomError

func NewCustomError(message string) *Error

func NewDataError

func NewDataError(message string) *Error

func NewError

func NewError(code uint32, message string) *Error

func NewNotExistError

func NewNotExistError(message string) *Error

func NewParamError

func NewParamError(message string) *Error

func NewTypeTransferError

func NewTypeTransferError(message string) *Error

func NewUnknownError

func NewUnknownError(message string) *Error

func TransferFromError

func TransferFromError(err error) *Error

func (*Error) Code

func (err *Error) Code() uint32

func (*Error) Error

func (err *Error) Error() string

func (*Error) Format

func (err *Error) Format(s fmt.State, verb rune)

func (*Error) Is

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

func (*Error) WithStack

func (err *Error) WithStack() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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