Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype Showing a = Showing a
- data MafocIOException
- = Can't_deserialise_LedgerState_from_CBOR FilePath DeserialiseFailure
- | Can't_parse_chain_point_from_LedgerState_file_name FilePath String
- | The_impossible_happened {
- whatItWas :: Text
- | SlotNo_not_found SlotNo
- | No_headerDb_specified
- | Can't_find_previous_ChainPoint_to_slot SlotNo
- | ChainPoints_don't_match [(String, Maybe ChainPoint)]
- | RTS_GC_stats_not_enabled
- | Indexer_has_no_HTTP_API
- | TextException Text
- data CardanoAssumptionBroken
- = Epoch_difference_other_than_0_or_1 {
- epochNo :: EpochNo
- followingEpochNo :: EpochNo
- | Epoch_number_disappears {
- previouslyExistingEpochNo :: EpochNo
- | UTxO_not_found {
- attemptedToSpend :: TxIn
- slotNo :: SlotNo
- bhh :: Hash BlockHeader
- | Block_number_ahead_of_tip {
- blockNumberInBlock :: BlockNo
- blockNumberInChainTip :: ChainTip
- = Epoch_difference_other_than_0_or_1 {
- throwShow :: Show a => a -> IO b
- throw :: forall (r :: RuntimeRep) (a :: TYPE r) e. Exception e => e -> a
- throwIO :: Exception e => e -> IO a
Documentation
Showing a |
Instances
Show a => Pretty (Showing a) # | |
Defined in Mafoc.Exceptions pretty :: Showing a -> Doc ann prettyList :: [Showing a] -> Doc ann |
data MafocIOException #
Can't_deserialise_LedgerState_from_CBOR FilePath DeserialiseFailure | |
Can't_parse_chain_point_from_LedgerState_file_name FilePath String | |
The_impossible_happened | Impossible |
| |
SlotNo_not_found SlotNo | Header-DB |
No_headerDb_specified | |
Can't_find_previous_ChainPoint_to_slot SlotNo | |
ChainPoints_don't_match [(String, Maybe ChainPoint)] | ChainPoints from multiple state sources |
RTS_GC_stats_not_enabled | GHC.Stats.getRTSStats: GC stats not enabled. Use `+RTS -T -RTS' to enable them. |
Indexer_has_no_HTTP_API | An escape-hatch exception: an exception where we don't bother with structure, but just explain in text. Perhaps we'll find a category later. |
TextException Text |
Instances
Exception MafocIOException # | |
Defined in Mafoc.Exceptions | |
Show MafocIOException # | |
Defined in Mafoc.Exceptions showsPrec :: Int -> MafocIOException -> ShowS # show :: MafocIOException -> String # showList :: [MafocIOException] -> ShowS # | |
Pretty MafocIOException # | |
Defined in Mafoc.Exceptions pretty :: MafocIOException -> Doc ann prettyList :: [MafocIOException] -> Doc ann |
data CardanoAssumptionBroken #
Epoch_difference_other_than_0_or_1 | |
| |
Epoch_number_disappears | |
| |
UTxO_not_found | |
| |
Block_number_ahead_of_tip | |
|
Instances
Exception CardanoAssumptionBroken # | |
Show CardanoAssumptionBroken # | |
Defined in Mafoc.Exceptions showsPrec :: Int -> CardanoAssumptionBroken -> ShowS # show :: CardanoAssumptionBroken -> String # showList :: [CardanoAssumptionBroken] -> ShowS # | |
Pretty CardanoAssumptionBroken # | |
Defined in Mafoc.Exceptions pretty :: CardanoAssumptionBroken -> Doc ann prettyList :: [CardanoAssumptionBroken] -> Doc ann |
throw :: forall (r :: RuntimeRep) (a :: TYPE r) e. Exception e => e -> a #
Throw an exception. Exceptions may be thrown from purely
functional code, but may only be caught within the IO
monad.
throwIO :: Exception e => e -> IO a #
A variant of throw
that can only be used within the IO
monad.
Although throwIO
has a type that is an instance of the type of throw
, the
two functions are subtly different:
throw e `seq` x ===> throw e throwIO e `seq` x ===> x
The first example will cause the exception e
to be raised,
whereas the second one won't. In fact, throwIO
will only cause
an exception to be raised when it is used within the IO
monad.
The throwIO
variant should be used in preference to throw
to
raise an exception within the IO
monad because it guarantees
ordering with respect to other IO
operations, whereas throw
does not.