aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Error.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-02-22 13:59:38 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2021-02-22 14:01:04 -0800
commitbafccd5aa2dc977e5e49b67c587e1507dd73417c (patch)
treedc88ea4ea814c8ee0f6a272dec8075f76d380ed1 /src/Text/Pandoc/Error.hs
parent4617f229ea051fea50bce6307fe8221b246a23fe (diff)
downloadpandoc-bafccd5aa2dc977e5e49b67c587e1507dd73417c.tar.gz
T.P.Error: Add PandocUnsupportedCharsetError constructor...
...for PandocError. [API change]
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 0fdb7bfe5..8102f04cc 100644
--- a/src/Text/Pandoc/Error.hs
+++ b/src/Text/Pandoc/Error.hs
@@ -60,6 +60,7 @@ data PandocError = PandocIOError Text IOError
| PandocMacroLoop Text
| PandocUTF8DecodingError Text Int Word8
| PandocIpynbDecodingError Text
+ | PandocUnsupportedCharsetError Text
| PandocUnknownReaderError Text
| PandocUnknownWriterError Text
| PandocUnsupportedExtensionError Text Text
@@ -124,6 +125,8 @@ renderError e =
"The input must be a UTF-8 encoded text."
PandocIpynbDecodingError w ->
"ipynb decoding error: " <> w
+ PandocUnsupportedCharsetError charset ->
+ "Unsupported charset " <> charset
PandocUnknownReaderError r ->
"Unknown input format " <> r <>
case r of
@@ -183,6 +186,7 @@ handleError (Left e) =
PandocMacroLoop{} -> 91
PandocUTF8DecodingError{} -> 92
PandocIpynbDecodingError{} -> 93
+ PandocUnsupportedCharsetError{} -> 94
PandocUnknownReaderError{} -> 21
PandocUnknownWriterError{} -> 22
PandocUnsupportedExtensionError{} -> 23