aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Error.hs
AgeCommit message (Collapse)AuthorFilesLines
2017-05-02Added PandocResourceNotFound error.John MacFarlane1-0/+3
Use this instead of PandocIOError when a resource is not found in path. This improves the error message in this case, see #3629.
2017-04-15Error: Added PandocCouldNotFindDataFileError.John MacFarlane1-0/+3
Use this instead of PandocAppError when appropriate. Removed exit code from PandocAppError, use 1 for all.
2017-04-15Fixed shadowing warningsJohn MacFarlane1-5/+5
2017-04-15Error: Added PandocFilterError.John MacFarlane1-0/+3
2017-04-15Error: Added PandocPDFErrorJohn MacFarlane1-0/+2
2017-04-15Text.Pandoc.Error: added new constructors.John MacFarlane1-0/+7
- PandocSyntaxMapError String - PandocFailOnWarningError - PandocPDFProgramNotFoundError String
2017-04-04Error: Added PandocOptionError.John MacFarlane1-0/+2
2017-04-02Text.Pandoc.App: Throw errors rather than exiting.John MacFarlane1-1/+10
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.
2017-03-04Stylish-haskell automatic formatting changes.John MacFarlane1-4/+5
2017-02-23Removed unnecessary import.John MacFarlane1-5/+1
2017-02-23Fix compiler warning for older GHC versions.John MacFarlane1-2/+5
2017-02-23Error: Changed PandocFileReadError to PandocIOErrorJohn MacFarlane1-2/+3
2017-02-19Error: added PandocMakePDFErrorJohn MacFarlane1-0/+2
2017-02-10Added Text.Pandoc.Logging (exported module).John MacFarlane1-8/+3
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.
2017-01-25Generic instance for PandocError.John MacFarlane1-1/+2
2017-01-25Error: change type of handleError.John MacFarlane1-11/+11
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.
2017-01-25Unify Errors.Jesse Rosenthal1-8/+18
2016-09-02Remove Text.Pandoc.Compat.ExceptJesse Rosenthal1-5/+0
2016-08-06Fix out of index error in handleErrorMatthew Pickering1-4/+8
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.
2016-03-22Updated copyright dates to include 2016.John MacFarlane1-2/+2
2015-11-09Revert "Use -XNoImplicitPrelude and 'import Prelude' explicitly."John MacFarlane1-1/+0
This reverts commit c423dbb5a34c2d1195020e0f0ca3aae883d0749b.
2015-11-08Use -XNoImplicitPrelude and 'import Prelude' explicitly.John MacFarlane1-0/+1
This is needed for ghci to work with pandoc, given that we now use a custom prelude. Closes #2503.
2015-10-11Removed unnecessary import.John MacFarlane1-1/+1
2015-10-11Define Typeable and Exception instances for PandocError.John MacFarlane1-1/+6
Closes #2386.
2015-02-18Move utility error functions to Text.Pandoc.SharedMatthew Pickering1-8/+1
2015-02-18Update haddocks and copyright noticesMatthew Pickering1-2/+34
2015-02-18Add Text.Pandoc.Error module with PandocError typeMatthew Pickering1-0/+39