Documentation ¶
Index ¶
- Variables
- func As(err error, target interface{}) bool
- func Cause(err error) error
- func Code(err error) *codes.Code
- func Is(err, target error) bool
- func New(text string) error
- func Next(err error) error
- func Replace(err error, text string, condition ...codes.Code) error
- func Stack(err error) *stack.Stack
- func Unwrap(err error) error
- type Error
- func (e *Error) As(target interface{}) bool
- func (e *Error) Cause() error
- func (e *Error) Code() *codes.Code
- func (e *Error) Error() (text string)
- func (e *Error) Format(s fmt.State, verb rune)
- func (e *Error) Is(target error) bool
- func (e *Error) Next() error
- func (e *Error) Replace(text string, condition ...*codes.Code) error
- func (e *Error) Stack() *stack.Stack
- func (e *Error) String() string
- func (e *Error) Unwrap() error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidGID = New("invalid gate id") ErrInvalidNID = New("invalid node id") ErrInvalidMessage = New("invalid message") ErrNotFoundSession = New("not found session") ErrInvalidSessionKind = New("invalid session kind") ErrReceiveTargetEmpty = New("the receive target is empty") ErrInvalidArgument = New("invalid argument") ErrNotFoundRoute = New("not found route") ErrNotFoundEvent = New("not found event") ErrNotFoundEndpoint = New("not found endpoint") ErrNotFoundUserLocation = New("not found user's location") ErrClientShut = New("client is shut") ErrConnectionHanged = New("connection is hanged") ErrConnectionClosed = New("connection is closed") ErrTooManyConnection = New("too many connection") ErrSeqOverflow = New("seq overflow") ErrRouteOverflow = New("route overflow") ErrBufferTooLarge = New("buffer too large") )
Functions ¶
Types ¶
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
func NewError ¶
func NewError(args ...interface{}) *Error
NewError 新建一个错误 可传入一下参数: text : 文本字符串 code : 错误码 error: 原生错误
func NewErrorWithStack ¶
func NewErrorWithStack(args ...interface{}) *Error
NewErrorWithStack 新建一个带堆栈的错误 可传入一下参数: text : 文本字符串 code : 错误码 error: 原生错误
Click to show internal directories.
Click to hide internal directories.