errors

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ERROR_UNKNOWN_ERROR = 90000 + iota

	ERR_VALIDATE_SCHEMA_ERROR
	ERR_NO_SUCH_SCHEMA
	ERR_NO_SUCH_SERVER
	ERR_NO_SUCH_METHOD

	ERROR_CALLING_NOT_CORRECT_RESPONSE
	ERROR_CALLING_NO_RESPONSE_DEFINED

	ERROR_FORBIDDEN
)
View Source
const HelpUtlTitle = "在线获得帮助"

Variables

This section is empty.

Functions

func Code

func Code(err error) int

func Fatal

func Fatal(code int, msg ...interface{})

func Log

func Log(err error, msg ...string)

func Own

func Own(err error) bool

func RegMessage

func RegMessage(zone int, fn errPrtFns)

func Warn

func Warn(code int, msg ...interface{})

Types

type Error

type Error struct {
	Code  int
	Cause error
}

func New

func New(code int, msgs ...interface{}) *Error

func (*Error) Error

func (e *Error) Error() string

func (*Error) MarshalJSON

func (n *Error) MarshalJSON() ([]byte, error)

func (*Error) RespondAsJson

func (e *Error) RespondAsJson() bool

func (*Error) UnmarshalJSON

func (n *Error) UnmarshalJSON(bts []byte) error

Jump to

Keyboard shortcuts

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