Skip to content

Commit 11a2f78

Browse files
authored
PandocMonad: convert IOErrors to warnings when fetching absolute paths (#9859)
1 parent 7db19d8 commit 11a2f78

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Text/Pandoc/Class/PandocMonad.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,11 @@ fillMediaBag d = walkM handleImage d
467467
return $ Image attr lab (src, tit))
468468
(\e ->
469469
case e of
470+
PandocIOError text err -> do
471+
report $ CouldNotFetchResource text . T.pack $
472+
(show err ++ "\nReplacing image with description.")
473+
-- emit alt text
474+
return $ replacementSpan attr src tit lab
470475
PandocResourceNotFound _ -> do
471476
report $ CouldNotFetchResource src
472477
"replacing image with description"

0 commit comments

Comments
 (0)