aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/FB2.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-02-10 23:59:47 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2017-02-11 00:14:44 +0100
commit76c55466d3087224eccdc47c804ab2904be50df5 (patch)
tree8e605c9a6ab89569d8b51898f31487ac0c005a22 /src/Text/Pandoc/Writers/FB2.hs
parent8ad7e2c21fd00d8225c5f243bf3383c956b6c83b (diff)
downloadpandoc-76c55466d3087224eccdc47c804ab2904be50df5.tar.gz
Use new warnings throughout the code base.
Diffstat (limited to 'src/Text/Pandoc/Writers/FB2.hs')
-rw-r--r--src/Text/Pandoc/Writers/FB2.hs10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/Text/Pandoc/Writers/FB2.hs b/src/Text/Pandoc/Writers/FB2.hs
index 600d34499..6325b5f73 100644
--- a/src/Text/Pandoc/Writers/FB2.hs
+++ b/src/Text/Pandoc/Writers/FB2.hs
@@ -41,13 +41,13 @@ import qualified Text.XML.Light.Cursor as XC
import qualified Data.ByteString.Char8 as B8
import Control.Monad.Except (throwError, catchError)
-
+import Text.Pandoc.Logging
import Text.Pandoc.Definition
import Text.Pandoc.Options (WriterOptions(..), HTMLMathMethod(..), def)
import Text.Pandoc.Shared (orderedListMarkers, isHeaderBlock, capitalize,
linesToPara)
import Text.Pandoc.Error
-import Text.Pandoc.Class (PandocMonad)
+import Text.Pandoc.Class (PandocMonad, report)
import qualified Text.Pandoc.Class as P
-- | Data to be written at the end of the document:
@@ -244,14 +244,12 @@ fetchImage href link = do
catchError (do (bs, mbmime) <- P.fetchItem Nothing link
case mbmime of
Nothing -> do
- P.warning ("Could not determine mime type for "
- ++ link)
+ report $ CouldNotDetermineMimeType link
return Nothing
Just mime -> return $ Just (mime,
B8.unpack $ encode bs))
(\e ->
- do P.warning ("Could not fetch " ++ link ++
- ":\n" ++ show e)
+ do report $ CouldNotFetchResource link (show e)
return Nothing)
case mbimg of
Just (imgtype, imgdata) -> do