aboutsummaryrefslogtreecommitdiff
path: root/CabalHelper/Shared
diff options
context:
space:
mode:
Diffstat (limited to 'CabalHelper/Shared')
-rw-r--r--CabalHelper/Shared/Common.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/CabalHelper/Shared/Common.hs b/CabalHelper/Shared/Common.hs
index 588cd03..b4c9e46 100644
--- a/CabalHelper/Shared/Common.hs
+++ b/CabalHelper/Shared/Common.hs
@@ -42,6 +42,9 @@ instance Exception Panic
panic :: String -> a
panic msg = throw $ Panic msg
+panicIO :: String -> IO a
+panicIO msg = throwIO $ Panic msg
+
handlePanic :: IO a -> IO a
handlePanic action =
action `E.catch` \(Panic msg) -> errMsg msg >> exitFailure