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.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Error.hs b/src/Text/Pandoc/Error.hs
index 2e67e5bc1..63973bd05 100644
--- a/src/Text/Pandoc/Error.hs
+++ b/src/Text/Pandoc/Error.hs
@@ -32,6 +32,7 @@ import Text.Printf (printf)
import Text.Parsec.Error
import Text.Parsec.Pos hiding (Line)
import Text.Pandoc.Shared (tshow)
+import Citeproc (CiteprocError, prettyCiteprocError)
type Input = Text
@@ -60,6 +61,7 @@ data PandocError = PandocIOError Text IOError
| PandocUnknownReaderError Text
| PandocUnknownWriterError Text
| PandocUnsupportedExtensionError Text Text
+ | PandocCiteprocError CiteprocError
deriving (Show, Typeable, Generic)
instance Exception PandocError
@@ -139,6 +141,8 @@ handleError (Left e) =
PandocUnsupportedExtensionError ext f -> err 23 $
"The extension " <> ext <> " is not supported " <>
"for " <> f
+ PandocCiteprocError e' -> err 24 $
+ prettyCiteprocError e'
err :: Int -> Text -> IO a
err exitCode msg = do