summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Error.hs
Commit message (Collapse)AuthorAge
* Update copyright notices to include 2018Albert Krewinkel2018-01-05
|
* Don't rely on syb when we don't need to.John MacFarlane2017-10-27
|
* Automatic reformating by stylish-haskell.John MacFarlane2017-10-27
|
* In rendering PandocParsecError, only print input at error location...John MacFarlane2017-10-21
| | | | | | | | | | | | if the source name is `source` (i.e., the top level). Otherwise results will be misleading, since what readM does is to look up the source position of the error in the *original* input, which may not match the input used by parseFromString or in parsing from an included file. Closes #3865. Not a great fix, maybe there's something better that could be done, but this should at least avoid misleading messages.
* Support for PDF generation via `weasyprint` and `prince` (#3909)Mauro Bieg2017-09-11
| | | | | | | * Rename --latex-engine to --pdf-engine * In `Text.Pandoc.Options.WriterOptions`, rename `writerLaTeXEngine` to `writerPdfEngine` and `writerLaTeXArgs` to `writerPdfArgs`. * Add support for `weasyprint` and `prince`, in addition to `wkhtmltopdf`, for PDF generation via HTML (closes #3906). * `Text.Pandoc.PDF.html2pdf`: use stdin instead of intermediate HTML file
* Rewrote LaTeX reader with proper tokenization.John MacFarlane2017-07-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This rewrite is primarily motivated by the need to get macros working properly. A side benefit is that the reader is significantly faster (27s -> 19s in one benchmark, and there is a lot of room for further optimization). We now tokenize the input text, then parse the token stream. Macros modify the token stream, so they should now be effective in any context, including math. Thus, we no longer need the clunky macro processing capacities of texmath. A custom state LaTeXState is used instead of ParserState. This, plus the tokenization, will require some rewriting of the exported functions rawLaTeXInline, inlineCommand, rawLaTeXBlock. * Added Text.Pandoc.Readers.LaTeX.Types (new exported module). Exports Macro, Tok, TokType, Line, Column. [API change] * Text.Pandoc.Parsing: adjusted type of `insertIncludedFile` so it can be used with token parser. * Removed old texmath macro stuff from Parsing. Use Macro from Text.Pandoc.Readers.LaTeX.Types instead. * Removed texmath macro material from Markdown reader. * Changed types for Text.Pandoc.Readers.LaTeX's rawLaTeXInline and rawLaTeXBlock. (Both now return a String, and they are polymorphic in state.) * Added orgMacros field to OrgState. [API change] * Removed readerApplyMacros from ReaderOptions. Now we just check the `latex_macros` reader extension. * Allow `\newcommand\foo{blah}` without braces. Fixes #1390. Fixes #2118. Fixes #3236. Fixes #3779. Fixes #934. Fixes #982.
* Added `writerEpubSubdirectory` to `WriterOptions`.John MacFarlane2017-06-22
| | | | | | | | | | | | [API change] The EPUB writer now takes its EPUB subdirectory from this option. Also added `PandocEpubSubdirectoryError` to `PandocError`. This is raised if the EPUB subdirectory is not all ASCII alphanumerics. See #3720.
* Text.Pandoc.Error: added PandocTemplateError.John MacFarlane2017-06-20
|
* hlint suggestions.John MacFarlane2017-06-02
|
* Update dates in copyright noticesAlbert Krewinkel2017-05-13
| | | | | This follows the suggestions given by the FSF for GPL licensed software. <https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html>
* Added PandocHttpException, trap exceptions in fetching from URLs.John MacFarlane2017-05-07
| | | | Closes #3646.
* Added PandocResourceNotFound error.John MacFarlane2017-05-02
| | | | | | | Use this instead of PandocIOError when a resource is not found in path. This improves the error message in this case, see #3629.
* Error: Added PandocCouldNotFindDataFileError.John MacFarlane2017-04-15
| | | | | Use this instead of PandocAppError when appropriate. Removed exit code from PandocAppError, use 1 for all.
* Fixed shadowing warningsJohn MacFarlane2017-04-15
|
* Error: Added PandocFilterError.John MacFarlane2017-04-15
|
* Error: Added PandocPDFErrorJohn MacFarlane2017-04-15
|
* Text.Pandoc.Error: added new constructors.John MacFarlane2017-04-15
| | | | | | - PandocSyntaxMapError String - PandocFailOnWarningError - PandocPDFProgramNotFoundError String
* Error: Added PandocOptionError.John MacFarlane2017-04-04
|
* Text.Pandoc.App: Throw errors rather than exiting.John MacFarlane2017-04-02
| | | | | | | | | | | | | | | | | These are caught (and lead to exit) in pandoc.hs, but other uses of Text.Pandoc.App may want to recover in another way. Added PandocAppError to PandocError (API change). This is a stopgap: later we should have a separate constructor for each type of error. Also fixed uses of 'exit' in Shared.readDataFile, and removed 'err' from Shared (API change). Finally, removed the dependency on extensible-exceptions. See #3548.
* Stylish-haskell automatic formatting changes.John MacFarlane2017-03-04
|
* Removed unnecessary import.John MacFarlane2017-02-23
|
* Fix compiler warning for older GHC versions.John MacFarlane2017-02-23
|
* Error: Changed PandocFileReadError to PandocIOErrorJohn MacFarlane2017-02-23
|
* Error: added PandocMakePDFErrorJohn MacFarlane2017-02-19
|
* Added Text.Pandoc.Logging (exported module).John MacFarlane2017-02-10
| | | | | | | | | | | | This now contains the Verbosity definition previously in Options, as well as a new LogMessage datatype that will eventually be used instead of raw strings for warnings. This will enable us, among other things, to provide machine-readable warnings if desired. See #3392.
* Generic instance for PandocError.John MacFarlane2017-01-25
|
* Error: change type of handleError.John MacFarlane2017-01-25
| | | | | | | | | It now lives in IO and gives a proper message + exit instead of calling 'error'. We shouldn't be making it easier for people to raise error on pure code. And this is better for the main application in IO.
* Unify Errors.Jesse Rosenthal2017-01-25
|
* Remove Text.Pandoc.Compat.ExceptJesse Rosenthal2016-09-02
|
* Fix out of index error in handleErrorMatthew Pickering2016-08-06
| | | | | | | | | | | | | | | | | | In the latex parser when includes are processed, the text of the included file is directly included into the parse stream. This caused problems when there was an error in the included file (and the included file was longer than the original file) as the error would be reported at this position. The error handling tries to display the line and position where the error occured. It works by including a copy of the input and finding the place in the input when given the position of the error. In the previously described scenario, the input file would be the original source file but the error position would be the position of the error in the included file. The fix is to not try to show the exact line when it would cause an out-of-bounds error.
* Updated copyright dates to include 2016.John MacFarlane2016-03-22
|
* Revert "Use -XNoImplicitPrelude and 'import Prelude' explicitly."John MacFarlane2015-11-09
| | | | This reverts commit c423dbb5a34c2d1195020e0f0ca3aae883d0749b.
* Use -XNoImplicitPrelude and 'import Prelude' explicitly.John MacFarlane2015-11-08
| | | | | | | This is needed for ghci to work with pandoc, given that we now use a custom prelude. Closes #2503.
* Removed unnecessary import.John MacFarlane2015-10-11
|
* Define Typeable and Exception instances for PandocError.John MacFarlane2015-10-11
| | | | Closes #2386.
* Move utility error functions to Text.Pandoc.SharedMatthew Pickering2015-02-18
|
* Update haddocks and copyright noticesMatthew Pickering2015-02-18
|
* Add Text.Pandoc.Error module with PandocError typeMatthew Pickering2015-02-18