aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Error.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/Error.hs')
-rw-r--r--src/Text/Pandoc/Error.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Error.hs b/src/Text/Pandoc/Error.hs
index 204cf15ca..831405f42 100644
--- a/src/Text/Pandoc/Error.hs
+++ b/src/Text/Pandoc/Error.hs
@@ -48,6 +48,7 @@ data PandocError = PandocIOError Text IOError
| PandocFailOnWarningError
| PandocPDFProgramNotFoundError Text
| PandocPDFError Text
+ | PandocXMLError Text Text
| PandocFilterError Text Text
| PandocLuaError Text
| PandocCouldNotFindDataFileError Text
@@ -103,6 +104,8 @@ handleError (Left e) =
PandocPDFProgramNotFoundError pdfprog -> err 47 $
pdfprog <> " not found. Please select a different --pdf-engine or install " <> pdfprog
PandocPDFError logmsg -> err 43 $ "Error producing PDF.\n" <> logmsg
+ PandocXMLError fp logmsg -> err 44 $ "Invalid XML" <>
+ (if T.null fp then "" else " in " <> fp) <> ":\n" <> logmsg
PandocFilterError filtername msg -> err 83 $ "Error running filter " <>
filtername <> ":\n" <> msg
PandocLuaError msg -> err 84 $ "Error running Lua:\n" <> msg