@@ -105,7 +105,7 @@ getPOSIXTime = utcTimeToPOSIXSeconds <$> getCurrentTime
106-- We can add to this as we go
106-- We can add to this as we go
107data PandocExecutionError = PandocFileReadError String
107data PandocExecutionError = PandocFileReadError String
108− deriving Show
108+ deriving (Show, Typeable)
110-- Nothing in this for now, but let's put it there anyway.
110-- Nothing in this for now, but let's put it there anyway.
111data PandocStateIO = PandocStateIO
111data PandocStateIO = PandocStateIO
@@ -174,10 +174,7 @@ data TestEnv = TestEnv { envEnv :: [(String, String)]
174 , envFontFiles :: [FilePath]
174 , envFontFiles :: [FilePath]
177−data TestException = TestException
178− deriving (Show, Typeable)
180−instance E.Exception TestException
177+instance E.Exception PandocExecutionError
182newtype PandocPure a = PandocPure {
179newtype PandocPure a = PandocPure {
183 unPandocPure :: ExceptT PandocExecutionError
180 unPandocPure :: ExceptT PandocExecutionError
@@ -230,7 +227,7 @@ instance PandocMonad PandocPure where
230 fps <- asks envFiles
227 fps <- asks envFiles
231 case lookup fp fps of
228 case lookup fp fps of
232 Just bs -> return (Right (bs, getMimeType fp))
229 Just bs -> return (Right (bs, getMimeType fp))
233− Nothing -> return (Left $ E.toException TestException)
230+ Nothing -> return (Left $ E.toException $ PandocFileReadError "oops")
235 fetchItem' media sourceUrl nm = do
232 fetchItem' media sourceUrl nm = do
236 case lookupMedia nm media of
233 case lookupMedia nm media of