T.P.Error: Add PandocUnsupportedCharsetError constructor...
...for PandocError. [API change]
This commit is contained in:
parent
4617f229ea
commit
bafccd5aa2
2 changed files with 5 additions and 0 deletions
|
@ -1477,6 +1477,7 @@ Nonzero exit codes have the following meanings:
|
||||||
91 PandocMacroLoop
|
91 PandocMacroLoop
|
||||||
92 PandocUTF8DecodingError
|
92 PandocUTF8DecodingError
|
||||||
93 PandocIpynbDecodingError
|
93 PandocIpynbDecodingError
|
||||||
|
94 PandocUnsupportedCharsetError
|
||||||
97 PandocCouldNotFindDataFileError
|
97 PandocCouldNotFindDataFileError
|
||||||
99 PandocResourceNotFound
|
99 PandocResourceNotFound
|
||||||
----- ------------------------------------
|
----- ------------------------------------
|
||||||
|
|
|
@ -60,6 +60,7 @@ data PandocError = PandocIOError Text IOError
|
||||||
| PandocMacroLoop Text
|
| PandocMacroLoop Text
|
||||||
| PandocUTF8DecodingError Text Int Word8
|
| PandocUTF8DecodingError Text Int Word8
|
||||||
| PandocIpynbDecodingError Text
|
| PandocIpynbDecodingError Text
|
||||||
|
| PandocUnsupportedCharsetError Text
|
||||||
| PandocUnknownReaderError Text
|
| PandocUnknownReaderError Text
|
||||||
| PandocUnknownWriterError Text
|
| PandocUnknownWriterError Text
|
||||||
| PandocUnsupportedExtensionError Text Text
|
| PandocUnsupportedExtensionError Text Text
|
||||||
|
@ -124,6 +125,8 @@ renderError e =
|
||||||
"The input must be a UTF-8 encoded text."
|
"The input must be a UTF-8 encoded text."
|
||||||
PandocIpynbDecodingError w ->
|
PandocIpynbDecodingError w ->
|
||||||
"ipynb decoding error: " <> w
|
"ipynb decoding error: " <> w
|
||||||
|
PandocUnsupportedCharsetError charset ->
|
||||||
|
"Unsupported charset " <> charset
|
||||||
PandocUnknownReaderError r ->
|
PandocUnknownReaderError r ->
|
||||||
"Unknown input format " <> r <>
|
"Unknown input format " <> r <>
|
||||||
case r of
|
case r of
|
||||||
|
@ -183,6 +186,7 @@ handleError (Left e) =
|
||||||
PandocMacroLoop{} -> 91
|
PandocMacroLoop{} -> 91
|
||||||
PandocUTF8DecodingError{} -> 92
|
PandocUTF8DecodingError{} -> 92
|
||||||
PandocIpynbDecodingError{} -> 93
|
PandocIpynbDecodingError{} -> 93
|
||||||
|
PandocUnsupportedCharsetError{} -> 94
|
||||||
PandocUnknownReaderError{} -> 21
|
PandocUnknownReaderError{} -> 21
|
||||||
PandocUnknownWriterError{} -> 22
|
PandocUnknownWriterError{} -> 22
|
||||||
PandocUnsupportedExtensionError{} -> 23
|
PandocUnsupportedExtensionError{} -> 23
|
||||||
|
|
Loading…
Add table
Reference in a new issue