mafoc-0.0.0.1
Safe HaskellSafe-Inferred
LanguageHaskell2010

Mafoc.Exceptions

Synopsis

Documentation

newtype Showing a #

Constructors

Showing a 

Instances

Instances details
Show a => Pretty (Showing a) # 
Instance details

Defined in Mafoc.Exceptions

Methods

pretty :: Showing a -> Doc ann

prettyList :: [Showing a] -> Doc ann

data MafocIOException #

Constructors

Can't_deserialise_LedgerState_from_CBOR FilePath DeserialiseFailure 
Can't_parse_chain_point_from_LedgerState_file_name FilePath String 
The_impossible_happened

Impossible

Fields

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 

throwShow :: Show a => a -> IO b #

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.