| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Ouroboros.Consensus.Storage.LeiosDB.Exception
Synopsis
- data LeiosDbException
- data LeiosDbFailure = LeiosDbFailure {}
- data LeiosDbWriteFailure = LeiosDbWriteFailure {}
- throwLeiosDbException ∷ (HasCallStack, MonadThrow m) ⇒ String → m a
Documentation
data LeiosDbException Source #
Every way the Leios DB fails.
Instances
| ToJSON LeiosDbException Source # | |
Defined in Ouroboros.Consensus.Storage.LeiosDB.Exception Methods toJSON ∷ LeiosDbException → Value Source # toEncoding ∷ LeiosDbException → Encoding Source # toJSONList ∷ [LeiosDbException] → Value Source # | |
| Exception LeiosDbException Source # | |
| Show LeiosDbException Source # | |
Defined in Ouroboros.Consensus.Storage.LeiosDB.Exception Methods showsPrec ∷ Int → LeiosDbException → ShowS # show ∷ LeiosDbException → String # showList ∷ [LeiosDbException] → ShowS # | |
data LeiosDbFailure Source #
A database operation failed where it ran.
Constructors
| LeiosDbFailure | |
Fields | |
Instances
| Show LeiosDbFailure Source # | |
Defined in Ouroboros.Consensus.Storage.LeiosDB.Exception Methods showsPrec ∷ Int → LeiosDbFailure → ShowS # show ∷ LeiosDbFailure → String # showList ∷ [LeiosDbFailure] → ShowS # | |
data LeiosDbWriteFailure Source #
A submitted write failed, as whoever awaits it sees it. A write runs on the writer rather than at its call site, so it knows what a read never can: which write it was, and where it was submitted from.
Constructors
| LeiosDbWriteFailure | |
Instances
| Show LeiosDbWriteFailure Source # | |
Defined in Ouroboros.Consensus.Storage.LeiosDB.Exception Methods showsPrec ∷ Int → LeiosDbWriteFailure → ShowS # show ∷ LeiosDbWriteFailure → String # showList ∷ [LeiosDbWriteFailure] → ShowS # | |
throwLeiosDbException ∷ (HasCallStack, MonadThrow m) ⇒ String → m a Source #
Fail with a LeiosDbException carrying the call stack. Preferred over
error: an invariant the database broke is still a database failure, and
callers catch it as one.