Copyright | (c) David Terei 2016 |
---|---|
License | BSD |
Maintainer | code@davidterei.com |
Stability | stable |
Portability | GHC |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Database.Memcache.Errors
Contents
Description
Memcached related errors and exception handling.
Synopsis
- data MemcacheError
- data Status
- data ClientError
- data ProtocolError
- = UnknownPkt { }
- | UnknownOp { }
- | UnknownStatus { }
- | BadLength { }
- | WrongOp { }
- | UnexpectedEOF { }
- throwStatus :: Status -> IO a
- wrongOp :: Response -> String -> MemcacheError
Error types
data MemcacheError Source #
All exceptions that a Memcached client may throw.
Constructors
OpError Status | Memcached operation error. |
ClientError ClientError | Error occuring on client side. |
ProtocolError ProtocolError | Errors occurring communicating with Memcached server. |
Instances
Exception MemcacheError Source # | |
Defined in Database.Memcache.Errors Methods toException :: MemcacheError -> SomeException # fromException :: SomeException -> Maybe MemcacheError # displayException :: MemcacheError -> String # | |
Show MemcacheError Source # | |
Defined in Database.Memcache.Errors Methods showsPrec :: Int -> MemcacheError -> ShowS # show :: MemcacheError -> String # showList :: [MemcacheError] -> ShowS # | |
Eq MemcacheError Source # | |
Defined in Database.Memcache.Errors Methods (==) :: MemcacheError -> MemcacheError -> Bool # (/=) :: MemcacheError -> MemcacheError -> Bool # |
The status (success or error) of a Memcached operation returned in a
Response
.
Constructors
NoError | Operation successful. |
ErrKeyNotFound | Key not found. |
ErrKeyExists | Key exists when not expected. |
ErrValueTooLarge | Value too large to store at server. |
ErrInvalidArgs | Invalid arguments for operation. |
ErrItemNotStored | Key-Value pair not stored at server (internal error). |
ErrValueNonNumeric | Value not numeric when increment or decrement requested. |
ErrUnknownCommand | Server doesn't know requested command. |
ErrOutOfMemory | Server out of memory. |
SaslAuthFail | SASL authentication failed. |
SaslAuthContinue | SASL authentication requires more steps. |
data ClientError Source #
Errors that occur on the client.
Constructors
NoServersReady | All servers are currently marked failed. |
Timeout | Timeout occurred sending request to server. |
Instances
Show ClientError Source # | |
Defined in Database.Memcache.Errors Methods showsPrec :: Int -> ClientError -> ShowS # show :: ClientError -> String # showList :: [ClientError] -> ShowS # | |
Eq ClientError Source # | |
Defined in Database.Memcache.Errors |
data ProtocolError Source #
Errors related to Memcached protocol and bytes on the wire.
Constructors
UnknownPkt | Received an unknown response packet. |
Fields | |
UnknownOp | Unknown Memcached operation. |
Fields | |
UnknownStatus | Unknown Memcached status field value. |
Fields | |
BadLength | Unexpected length of a Memcached field (extras, key, or value). |
Fields | |
WrongOp | Response packet is for a different operation than expected. |
Fields | |
UnexpectedEOF | Network socket closed without receiving enough bytes. |
Fields |
Instances
Show ProtocolError Source # | |
Defined in Database.Memcache.Errors Methods showsPrec :: Int -> ProtocolError -> ShowS # show :: ProtocolError -> String # showList :: [ProtocolError] -> ShowS # | |
Eq ProtocolError Source # | |
Defined in Database.Memcache.Errors Methods (==) :: ProtocolError -> ProtocolError -> Bool # (/=) :: ProtocolError -> ProtocolError -> Bool # |
Error creation
throwStatus :: Status -> IO a Source #
Convert a status to MemcacheError
exception.