aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/Docx.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2013-07-18 20:58:14 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2013-07-18 20:58:14 -0700
commit7c980f39bf1cff941d3e78056fd69e0b371833e3 (patch)
treebecd213055d516dcc1a6cfa4d472a23503a6b0c8 /src/Text/Pandoc/Writers/Docx.hs
parent6c2e76ac617e5972db5d118525e7f6f59f43caac (diff)
downloadpandoc-7c980f39bf1cff941d3e78056fd69e0b371833e3.tar.gz
Improved fetching of external resources.
* In Shared, openURL and fetchItem now return an Either, for better error handling. (API change.) * Better error message when fetching a URL fails with `--self-contained`. * EPUB writer: If resource not found, skip it, as in Docx writer. * Closes #916.
Diffstat (limited to 'src/Text/Pandoc/Writers/Docx.hs')
-rw-r--r--src/Text/Pandoc/Writers/Docx.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Docx.hs b/src/Text/Pandoc/Writers/Docx.hs
index 1ed8c2fa5..611cddc65 100644
--- a/src/Text/Pandoc/Writers/Docx.hs
+++ b/src/Text/Pandoc/Writers/Docx.hs
@@ -726,7 +726,7 @@ inlineToOpenXML opts (Image alt (src, tit)) = do
Just (_,_,_,elt,_) -> return [elt]
Nothing -> do
let sourceDir = writerSourceDirectory opts
- res <- liftIO $ E.try $ fetchItem sourceDir src
+ res <- liftIO $ fetchItem sourceDir src
case res of
Left (_ :: E.SomeException) -> do
liftIO $ warn $ "Could not find image `" ++ src ++ "', skipping..."