Skip to content
This repository was archived by the owner on Aug 1, 2023. It is now read-only.

[GH-144] Rethrow cought exceptions to check if the application is throwing them. #145

Merged
merged 1 commit into from
May 10, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Cardano/Shell/Lib.hs
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ runCardanoApplicationWithFeatures applicationEnvironment cardanoFeatures cardano
-- Here we run the actual application.
-- We presume that the control-flow is now in the hands of that function.
-- An example of top-level-last-resort-error-handling-strategy.
liftIO $ catchAny (runCardanoApplication cardanoApplication) $ \_ -> do
--putTextLn "Exception occured!"
pure ()
liftIO $ catchAny (runCardanoApplication cardanoApplication) $ \exception -> do
-- For now simply rethrow, might be a good idea to have general exception handler.
throwM exception

-- When we reach this point, we cancel all the features.
_ <- mapM cancel (reverse asyncCardanoFeatures)
Expand Down