err

package
v0.0.1-202203071611 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2022 License: MPL-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrCodeUnknown  = ErrCodeModuleRoot + iota // unknown error code
	ErrCodeInternal                            // internal error
)

define common error code

View Source
const (
	ErrCodeModuleRoot = ErrCodeStart * (1 + iota)
)

ErrCodeModuleRoot define error code module, e,g: 10000, 20000, 30000...

View Source
const ErrCodeStart = 10000

ErrCodeStart 错误代码开始值

Variables

This section is empty.

Functions

This section is empty.

Types

type CodeError

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

func New

func New(msg string, args ...int) CodeError

New an error support error code

func (CodeError) Code

func (ce CodeError) Code() int

func (CodeError) Error

func (ce CodeError) Error() string

Jump to

Keyboard shortcuts

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