foundationdb-haskell-0.1.0.0: FoundationDB C client bindings
Safe HaskellNone
LanguageHaskell2010

FoundationDB.Error

Description

Types for all errors that can be thrown while using this library.

Synopsis

Documentation

data Error Source #

Represents all errors that can occur when running a Transaction.

Constructors

CError CError 
Error FDBHsError 

Instances

Instances details
Eq Error Source # 
Instance details

Defined in FoundationDB.Error.Internal

Methods

(==) :: Error -> Error -> Bool #

(/=) :: Error -> Error -> Bool #

Ord Error Source # 
Instance details

Defined in FoundationDB.Error.Internal

Methods

compare :: Error -> Error -> Ordering #

(<) :: Error -> Error -> Bool #

(<=) :: Error -> Error -> Bool #

(>) :: Error -> Error -> Bool #

(>=) :: Error -> Error -> Bool #

max :: Error -> Error -> Error #

min :: Error -> Error -> Error #

Show Error Source # 
Instance details

Defined in FoundationDB.Error.Internal

Methods

showsPrec :: Int -> Error -> ShowS #

show :: Error -> String #

showList :: [Error] -> ShowS #

Exception Error Source # 
Instance details

Defined in FoundationDB.Error.Internal

MonadError Error Transaction Source # 
Instance details

Defined in FoundationDB.Transaction

data DirLayerUserError Source #

Constructors

CannotOpenRoot

Thrown if the user attempts to open the root directory.

PrefixInUse

Thrown if the user specifies a manual prefix that is already in use.

ManualPrefixConflict ByteString

Thrown if a prefix manually specified by the user previously conflicts with a prefix chosen by the automatic allocator. Includes the conflicting prefix.

LayerMismatch ByteString ByteString

The layer bytestring provided to open' does not match the layer already present. The mismatched layers are included in this constructor.

VersionError Word32 Word32 Word32

Thrown if the directory layer structure already in FoundationDB is a newer major version than that provided by this library. This would mean that the directory layer was originally created by a newer version of one of the FoundationDB client libraries. The major, minor, micro version of the directory layer are provided to this constructor.

data FDBHsError Source #

Errors arising from the foundationdb-haskell library implementation.

Constructors

DirLayerUserError DirLayerUserError

Errors that can occur from user error when using the directory layer.

DirectoryLayerInternalError String

Errors that can occur when doing directory layer operations. These can be indicative of bugs in foundationdb-haskell.

ParseError String

Errors in parsing tuples.

MaxRetriesExceeded Error

Thrown by foundationdb-haskell's transaction retry logic. Contains the underlying error from the C bindings that caused the transaction to be retried.

UnsupportedAPIVersion

Thrown by foundationdb-haskell on startup if the Haskell code doesn't support the desired API version. This can happen even if the underlying C library does support the desired version -- we sometimes drop support for older versions sooner than the C API.

ConflictRangeParseFailure [(ByteString, ByteString)]

The structure of keys returned by the transaction module of the special keys keyspace was not in the expected format. The raw key/values are returned, unparsed.

TupleIntTooLarge

Thrown when an integer to be encoded by the tuple layer would take more than 255 bytes to encode.

data CError Source #

Errors that can come from the underlying C library. Most error names are self-explanatory. See https://apple.github.io/foundationdb/api-error-codes.html#developer-guide-error-codes for a description of these errors.

Instances

Instances details
Eq CError Source # 
Instance details

Defined in FoundationDB.Error.Internal

Methods

(==) :: CError -> CError -> Bool #

(/=) :: CError -> CError -> Bool #

Ord CError Source # 
Instance details

Defined in FoundationDB.Error.Internal

Show CError Source # 
Instance details

Defined in FoundationDB.Error.Internal

data ConflictRange Source #

Represents a range of keys that conflicted with another transaction. ConflictRange x y corresponds to a range of keys that share the prefix x (including x) up to the prefix y (not including y). It is always the case that x <= y.

retryable :: Error -> Bool Source #

Returns true if the given error indicates that the erroring transaction can be retried, but the transaction might have already been committed. In such cases, the transaction should only be retried if it is idempotent.

retryableNotCommitted :: Error -> Bool Source #

Returns true if the given error indicates that the transaction was definitely not committed.