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) 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) 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 ( ErrNil = New("nil") ErrInvalidGID = New("invalid gate id") ErrInvalidNID = New("invalid node id") ErrInvalidMessage = New("invalid message") ErrInvalidReader = New("invalid reader") 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") ErrConnectionOpened = New("connection is opened") ErrConnectionHanged = New("connection is hanged") ErrConnectionClosed = New("connection is closed") ErrConnectionNotOpened = New("connection is not opened") ErrConnectionNotHanged = New("connection is not hanged") ErrTooManyConnection = New("too many connection") ErrSeqOverflow = New("seq overflow") ErrRouteOverflow = New("route overflow") ErrMessageTooLarge = New("message too large") ErrInvalidDecoder = New("invalid decoder") ErrInvalidScanner = New("invalid scanner") ErrNoOperationPermission = New("no operation permission") ErrInvalidConfigContent = New("invalid config content") ErrNotFoundConfigSource = New("not found config source") ErrInvalidFormat = New("invalid format") ErrIllegalRequest = New("illegal request") ErrIllegalOperation = New("illegal operation") ErrInvalidPointer = New("invalid pointer") ErrNotFoundLocator = New("not found locator") ErrUnexpectedEOF = New("unexpected EOF") ErrMissTransporter = New("miss transporter") ErrMissDiscovery = New("miss discovery") ErrNotFoundDirectAddress = New("not found direct address") ErrUnknownError = New("unknown error") ErrClientClosed = New("client is closed") ErrActorExists = New("actor exists") ErrMissDispatchStrategy = New("missing dispatch strategy") ErrUnregisterRoute = New("unregistered route") ErrNotBindActor = New("not bind actor") ErrNotFoundActor = New("not found actor") )
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.