rpc/client/error.go

27 lines
552 B
Go
Raw Normal View History

2017-10-31 09:25:44 +00:00
package client
// ClientError is an error Client methods can return.
type ClientError struct {
// Set if the error is timeout-related.
Timeout bool
// Set if the error is connection-related.
Connection bool
// Set if the error is server-related.
Server bool
// Set if the error is related to internal resources' overflow.
// Increase PendingRequests if you see a lot of such errors.
Overflow bool
// May be set if AsyncResult.Cancel is called.
Canceled bool
err error
}
func (e *ClientError) Error() string {
return e.err.Error()
}