summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/ODT.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-05-02 16:00:04 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2017-05-02 16:00:04 +0200
commitcd2551c16c1da0404b8de182f17160aebb69219d (patch)
treeb6e959c06a95cfb8f8ae1b9ea5ac4c2ac78dacea /src/Text/Pandoc/Writers/ODT.hs
parent022d58e02a6276aa830639ad641aae1542731bbe (diff)
Added PandocResourceNotFound error.
Use this instead of PandocIOError when a resource is not found in path. This improves the error message in this case, see #3629.
Diffstat (limited to 'src/Text/Pandoc/Writers/ODT.hs')
-rw-r--r--src/Text/Pandoc/Writers/ODT.hs6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Writers/ODT.hs b/src/Text/Pandoc/Writers/ODT.hs
index 395ef0a96..6c6f38dbe 100644
--- a/src/Text/Pandoc/Writers/ODT.hs
+++ b/src/Text/Pandoc/Writers/ODT.hs
@@ -39,7 +39,6 @@ import System.FilePath (takeDirectory, takeExtension, (<.>))
import Text.Pandoc.Class (PandocMonad, report)
import qualified Text.Pandoc.Class as P
import Text.Pandoc.Definition
-import Text.Pandoc.Error (PandocError (..))
import Text.Pandoc.ImageSize
import Text.Pandoc.Logging
import Text.Pandoc.MIME (extensionFromMimeType, getMimeType)
@@ -178,10 +177,7 @@ transformPicMath opts (Image attr@(id', cls, _) lab (src,t)) = catchError
modify $ \st -> st{ stEntries = entry : entries }
return $ Image newattr lab (newsrc, t))
(\e -> do
- case e of
- PandocIOError _ e' ->
- report $ CouldNotFetchResource src (show e')
- e' -> report $ CouldNotFetchResource src (show e')
+ report $ CouldNotFetchResource src (show e)
return $ Emph lab)
transformPicMath _ (Math t math) = do