Documentation
¶
Index ¶
- Variables
- func As(err error, target any) 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") ErrConnectionAlived = New("connection is alived") ErrConnectionNotAlived = New("connection is not alived") 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") ErrConfigStoreFailed = New("config store failed") 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") ErrMissingTransporter = New("missing transporter") ErrMissingDiscovery = New("missing discovery") ErrNotFoundServiceAddress = New("not found service address") ErrUnknownError = New("unknown error") ErrClientClosed = New("client is closed") ErrClientStarted = New("client is started") ErrServerClosed = New("server is closed") ErrServerStarted = New("server is started") ErrActorExists = New("actor exists") ErrActorCreateFailed = New("actor create failed") ErrMissingDispatchStrategy = New("missing dispatch strategy") ErrUnregisterRoute = New("unregistered route") ErrNotBindActor = New("not bind actor") ErrNotFoundActor = New("not found actor") ErrSyncerClosed = New("syncer is closed") ErrDeadlineExceeded = New("deadline exceeded") ErrMissingResolver = New("missing resolver") ErrServiceRegisterFailed = New("service register failed") ErrServiceDeregisterFailed = New("service deregister failed") ErrRegistryClosed = New("registry is closed") ErrInvalidPublicKey = New("invalid public key") ErrInvalidPrivateKey = New("invalid private key") ErrInvalidSignature = New("invalid signature") ErrNotFoundIPAddress = New("not found ip address") ErrInvalidServiceDesc = New("invalid service desc") ErrInvalidCertFile = New("invalid cert file") ErrMissingCacheInstance = New("missing cache instance") ErrMissingEventbusInstance = New("missing eventbus instance") ErrActorNotStarted = New("actor not started") ErrWatcherStopped = New("watcher stopped") ErrWriteTimeout = New("write timeout") ErrQueueHanged = New("queue is hanged") ErrQueueClosed = New("queue is closed") ErrGateShutdown = New("gate is shutdown") ErrNodeShutdown = New("node is shutdown") ErrMeshShutdown = New("mesh is shutdown") ErrCacheClosed = New("cache is closed") ErrIllegalInvoke = New("illegal invoke") )
Functions ¶
Types ¶
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
func NewError ¶
NewError creates a new error.
The following arguments are recognized: a string sets the text, a *codes.Code sets the code, and an error sets the underlying error.
func NewErrorWithStack ¶
NewErrorWithStack creates a new error with a captured stack.
The following arguments are recognized: a string sets the text, a *codes.Code sets the code, and an error sets the underlying error.
func (*Error) Format ¶
Format implements fmt.Formatter.
The %s verb prints the error at the current level, %v prints all error information, and %+v prints all error information together with the stack.
func (*Error) Replace ¶
Replace replaces the text when condition is empty or matches the error code.
Click to show internal directories.
Click to hide internal directories.