aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Exception.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Haddock/Exception.hs')
-rw-r--r--src/Haddock/Exception.hs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Haddock/Exception.hs b/src/Haddock/Exception.hs
new file mode 100644
index 00000000..73ec2c5d
--- /dev/null
+++ b/src/Haddock/Exception.hs
@@ -0,0 +1,14 @@
+module Haddock.Exception (
+ HaddockException,
+ throwE
+)where
+
+import Data.Typeable
+import Control.Exception
+
+data HaddockException = HaddockException String deriving Typeable
+throwE str = throwDyn (HaddockException str)
+
+instance Show HaddockException where
+ show (HaddockException str) = str
+