diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2015-05-09 23:56:18 -0700 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2015-05-09 23:56:53 -0700 |
commit | 60bf4a8bfb543fcf8021356e6c4ad2b994acd8c8 (patch) | |
tree | 3ffeeb09923cf8019266e429bab3f5281945e55c /src/Text/Pandoc/Writers/RTF.hs | |
parent | 31b3f2ef8861a8af6c146a8c6f770c6165311fc2 (diff) | |
download | pandoc-60bf4a8bfb543fcf8021356e6c4ad2b994acd8c8.tar.gz |
Improved warnings when image size can't be determined.
Closes #1834.
Diffstat (limited to 'src/Text/Pandoc/Writers/RTF.hs')
-rw-r--r-- | src/Text/Pandoc/Writers/RTF.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/RTF.hs b/src/Text/Pandoc/Writers/RTF.hs index 588506f34..9eb02ad02 100644 --- a/src/Text/Pandoc/Writers/RTF.hs +++ b/src/Text/Pandoc/Writers/RTF.hs @@ -57,7 +57,10 @@ rtfEmbedImage opts x@(Image _ (src,_)) = do "image/png" -> "\\pngblip" _ -> error "Unknown file type" sizeSpec <- case imageSize imgdata of - Left msg -> warn msg >> return "" + Left msg -> do + warn $ "Could not determine image size in `" ++ + src ++ "': " ++ msg + return "" Right sz -> return $ "\\picw" ++ show xpx ++ "\\pich" ++ show ypx ++ "\\picwgoal" ++ show (xpt * 20) |