errors

package
v0.0.0-...-4e7898a Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PlayerModuleIndex    = 1100
	SocialModuleIndex    = 1101
	AcountModuleIndex    = 401
	AppPlayerModuleIndex = 402
)

Variables

View Source
var ErrErrIdNotFound = NewError(0, &Error{
	Code: 1, Type: pbProto.PacketType_WARNING, Message: "服务器错误"})
View Source
var ErrRateLimitExceeded = NewError(0, &Error{
	Code: 521, Type: pbProto.PacketType_WARNING, Message: "请求过于频繁"})
View Source
var (
	ModuleErrorCount = uint32(1000)
)

Functions

This section is empty.

Types

type Error

type Error struct {
	Code uint32 `json:"code"`
	// 错误类型(1: warning 2: error)
	Type    pbProto.PacketType `json:"type"`
	Message string             `json:"message"`
}

func GerError

func GerError(err error) *Error

func NewError

func NewError(index uint32, err *Error) *Error

func (*Error) Error

func (e *Error) Error() string

type IError

type IError interface {
	error
	GerError(id uint32) *Error
}

Jump to

Keyboard shortcuts

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