Safe Haskell | None |
---|---|
Language | Haskell2010 |
Types for all errors that can be thrown while using this library.
Synopsis
- data Error
- data DirLayerUserError
- data FDBHsError
- data CError
- = OperationFailed
- | TimedOut
- | TransactionTooOld
- | FutureVersion
- | NotCommitted [ConflictRange]
- | CommitUnknownResult
- | TransactionCanceled
- | TransactionTimedOut
- | TooManyWatches
- | WatchesDisabled
- | AccessedUnreadable
- | DatabaseLocked
- | ClusterVersionChanged
- | ExternalClientAlreadyLoaded
- | OperationCancelled
- | FutureReleased
- | PlatformError
- | LargeAllocFailed
- | PerformanceCounterError
- | IOError
- | FileNotFound
- | BindFailed
- | FileNotReadable
- | FileNotWritable
- | NoClusterFileFound
- | FileTooLarge
- | ClientInvalidOperation
- | CommitReadIncomplete
- | TestSpecificationInvalid
- | KeyOutsideLegalRange
- | InvertedRange
- | InvalidOptionValue
- | InvalidOption
- | NetworkNotSetup
- | NetworkAlreadySetup
- | ReadVersionAlreadySet
- | VersionInvalid
- | RangeLimitsInvalid
- | InvalidDatabaseName
- | AttributeNotFound
- | FutureNotSet
- | FutureNotError
- | UsedDuringCommit
- | InvalidMutationType
- | TransactionInvalidVersion
- | NoCommitVersion
- | EnvironmentVariableNetworkOptionFailed
- | TransactionReadOnly
- | IncompatibleProtocolVersion
- | TransactionTooLarge
- | KeyTooLarge
- | ValueTooLarge
- | ConnectionStringInvalid
- | AddressInUse
- | InvalidLocalAddress
- | TLSError
- | UnsupportedOperation
- | APIVersionUnset
- | APIVersionAlreadySet
- | APIVersionInvalid
- | APIVersionNotSupported
- | ExactModeWithoutLimits
- | UnknownError
- | InternalError
- | OtherError { }
- data ConflictRange = ConflictRange ByteString ByteString
- retryable :: Error -> Bool
- retryableNotCommitted :: Error -> Bool
Documentation
Represents all errors that can occur when running a Transaction
.
Instances
Eq Error Source # | |
Ord Error Source # | |
Show Error Source # | |
Exception Error Source # | |
Defined in FoundationDB.Error.Internal toException :: Error -> SomeException # fromException :: SomeException -> Maybe Error # displayException :: Error -> String # | |
MonadError Error Transaction Source # | |
Defined in FoundationDB.Transaction throwError :: Error -> Transaction a # catchError :: Transaction a -> (Error -> Transaction a) -> Transaction a # |
data DirLayerUserError Source #
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 |
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. |
Instances
Eq DirLayerUserError Source # | |
Defined in FoundationDB.Error.Internal (==) :: DirLayerUserError -> DirLayerUserError -> Bool # (/=) :: DirLayerUserError -> DirLayerUserError -> Bool # | |
Ord DirLayerUserError Source # | |
Defined in FoundationDB.Error.Internal compare :: DirLayerUserError -> DirLayerUserError -> Ordering # (<) :: DirLayerUserError -> DirLayerUserError -> Bool # (<=) :: DirLayerUserError -> DirLayerUserError -> Bool # (>) :: DirLayerUserError -> DirLayerUserError -> Bool # (>=) :: DirLayerUserError -> DirLayerUserError -> Bool # max :: DirLayerUserError -> DirLayerUserError -> DirLayerUserError # min :: DirLayerUserError -> DirLayerUserError -> DirLayerUserError # | |
Show DirLayerUserError Source # | |
Defined in FoundationDB.Error.Internal showsPrec :: Int -> DirLayerUserError -> ShowS # show :: DirLayerUserError -> String # showList :: [DirLayerUserError] -> ShowS # |
data FDBHsError Source #
Errors arising from the foundationdb-haskell library implementation.
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. |
Instances
Eq FDBHsError Source # | |
Defined in FoundationDB.Error.Internal (==) :: FDBHsError -> FDBHsError -> Bool # (/=) :: FDBHsError -> FDBHsError -> Bool # | |
Ord FDBHsError Source # | |
Defined in FoundationDB.Error.Internal compare :: FDBHsError -> FDBHsError -> Ordering # (<) :: FDBHsError -> FDBHsError -> Bool # (<=) :: FDBHsError -> FDBHsError -> Bool # (>) :: FDBHsError -> FDBHsError -> Bool # (>=) :: FDBHsError -> FDBHsError -> Bool # max :: FDBHsError -> FDBHsError -> FDBHsError # min :: FDBHsError -> FDBHsError -> FDBHsError # | |
Show FDBHsError Source # | |
Defined in FoundationDB.Error.Internal showsPrec :: Int -> FDBHsError -> ShowS # show :: FDBHsError -> String # showList :: [FDBHsError] -> ShowS # |
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.
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
.
Instances
Eq ConflictRange Source # | |
Defined in FoundationDB.Error.Internal (==) :: ConflictRange -> ConflictRange -> Bool # (/=) :: ConflictRange -> ConflictRange -> Bool # | |
Ord ConflictRange Source # | |
Defined in FoundationDB.Error.Internal compare :: ConflictRange -> ConflictRange -> Ordering # (<) :: ConflictRange -> ConflictRange -> Bool # (<=) :: ConflictRange -> ConflictRange -> Bool # (>) :: ConflictRange -> ConflictRange -> Bool # (>=) :: ConflictRange -> ConflictRange -> Bool # max :: ConflictRange -> ConflictRange -> ConflictRange # min :: ConflictRange -> ConflictRange -> ConflictRange # | |
Read ConflictRange Source # | |
Defined in FoundationDB.Error.Internal readsPrec :: Int -> ReadS ConflictRange # readList :: ReadS [ConflictRange] # | |
Show ConflictRange Source # | |
Defined in FoundationDB.Error.Internal showsPrec :: Int -> ConflictRange -> ShowS # show :: ConflictRange -> String # showList :: [ConflictRange] -> ShowS # |
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.