Documentation ¶
Index ¶
- Variables
- func Message(reqID uint64, errCode Code, errItem string) *rony.MessageEnvelope
- func New(code Code, item string) *rony.Error
- func NewF(code Code, item string, format string, args ...interface{}) *rony.Error
- func ToMessage(out *rony.MessageEnvelope, reqID uint64, errCode Code, errItem string)
- func Wrap(txt string) func(err error) error
- type Code
- type Multi
Constants ¶
This section is empty.
Variables ¶
View Source
var ( GenAccessErr = genWithErrorAndItem(Access) GenAlreadyExistsErr = genWithErrorAndItem(AlreadyExists) GenBusyErr = genWithErrorAndItem(Busy) GenExpiredErr = genWithErrorAndItem(Expired) GenIncompleteErr = genWithErrorAndItem(Incomplete) GenInternalErr = genWithErrorAndItem(Internal) GenInvalidErr = genWithErrorAndItem(Invalid) GenNotImplementedErr = genWithErrorAndItem(NotImplemented) GenOutOfRangeErr = genWithErrorAndItem(OutOfRange) GenPartiallyAppliedErr = genWithErrorAndItem(PartiallyApplied) GenTimeoutErr = genWithErrorAndItem(Timeout) GenTooFewErr = genWithErrorAndItem(TooFew) GenTooManyErr = genWithErrorAndItem(TooMany) )
View Source
var ( ErrInvalidRequest = GenInvalidErr("REQUEST", nil) ErrInternalServer = GenInternalErr("SERVER", nil) ErrInvalidHandler = GenInvalidErr("HANDLER", nil) )
View Source
var ( ErrClusterNotSet = fmt.Errorf("cluster is not set") ErrGatewayNotSet = fmt.Errorf("gateway is not set") ErrTunnelNotSet = fmt.Errorf("tunnel is not set") ErrUnexpectedResponse = fmt.Errorf("unexpected response") ErrUnexpectedTunnelResponse = fmt.Errorf("unexpected tunnel response") ErrMemberNotFound = fmt.Errorf("member not found") ErrGatewayAlreadyInitialized = fmt.Errorf("gateway already initialized") ErrNoTunnelAddrs = fmt.Errorf("tunnel address does not found") ErrRetriesExceeded = Wrap("maximum retries exceeded") ErrConnectionNotExists = fmt.Errorf("connection does not exists") )
Functions ¶
Types ¶
type Code ¶
type Code string
const ( Internal Code = "E00" // When Error is Unknown or it is internal and should not be exposed to the client Invalid Code = "E01" TooMany Code = "E03" TooFew Code = "E04" Incomplete Code = "E05" Timeout Code = "E06" Access Code = "E07" AlreadyExists Code = "E08" Busy Code = "E09" OutOfRange Code = "E10" PartiallyApplied Code = "E11" Expired Code = "E12" NotImplemented Code = "E13" )
Error Codes
Click to show internal directories.
Click to hide internal directories.