diff options
author | John MacFarlane <jgm@berkeley.edu> | 2021-02-22 13:59:38 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-02-22 14:01:04 -0800 |
commit | bafccd5aa2dc977e5e49b67c587e1507dd73417c (patch) | |
tree | dc88ea4ea814c8ee0f6a272dec8075f76d380ed1 /src/Text | |
parent | 4617f229ea051fea50bce6307fe8221b246a23fe (diff) | |
download | pandoc-bafccd5aa2dc977e5e49b67c587e1507dd73417c.tar.gz |
T.P.Error: Add PandocUnsupportedCharsetError constructor...
...for PandocError. [API change]
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Error.hs | 4 |
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 |