@@ -108,8 +108,7 @@ convertImages tmpdir (Image ils (src, tit)) = do
108 img <- convertImage tmpdir src
108 img <- convertImage tmpdir src
109 newPath <-
109 newPath <-
110 case img of
110 case img of
111− Left e -> src <$
111+ Left e -> src <$ warn e
112− warn ("Unable to convert image `" ++ src ++ "':\n" ++ e)
113 Right fp -> return fp
112 Right fp -> return fp
114 return (Image ils (newPath, tit))
113 return (Image ils (newPath, tit))
115convertImages _ x = return x
114convertImages _ x = return x
@@ -123,7 +122,8 @@ convertImage tmpdir fname =
123 Just "application/pdf" -> doNothing
122 Just "application/pdf" -> doNothing
124 _ -> JP.readImage fname >>= \res ->
123 _ -> JP.readImage fname >>= \res ->
125 case res of
124 case res of
126− Left msg -> return $ Left msg
125+ Left msg -> return $ Left $ "Unable to convert `" ++
126+ fname ++ "' for use with pdflatex."
127 Right img ->
127 Right img ->
128 E.catch (Right fileOut <$ JP.savePngImage fileOut img) $
128 E.catch (Right fileOut <$ JP.savePngImage fileOut img) $
129 \(e :: E.SomeException) -> return (Left (show e))
129 \(e :: E.SomeException) -> return (Left (show e))