Copyright | Copyright (C) 2006-2018 John MacFarlane |
---|---|
License | GNU GPL, version 2 or above |
Maintainer | John MacFarlane <jgm@berkeley.edu> |
Stability | alpha |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
This module provides a standard way to deal with possible errors encounted during parsing.
Synopsis
- data PandocError
- = PandocIOError String IOError
- | PandocHttpError String HttpException
- | PandocShouldNeverHappenError String
- | PandocSomeError String
- | PandocParseError String
- | PandocParsecError Input ParseError
- | PandocMakePDFError String
- | PandocOptionError String
- | PandocSyntaxMapError String
- | PandocFailOnWarningError
- | PandocPDFProgramNotFoundError String
- | PandocPDFError String
- | PandocFilterError String String
- | PandocCouldNotFindDataFileError String
- | PandocResourceNotFound String
- | PandocTemplateError String
- | PandocAppError String
- | PandocEpubSubdirectoryError String
- | PandocMacroLoop String
- handleError :: Either PandocError a -> IO a
Documentation
data PandocError Source #
Instances
Show PandocError Source # | |
Defined in Text.Pandoc.Error showsPrec :: Int -> PandocError -> ShowS # show :: PandocError -> String # showList :: [PandocError] -> ShowS # | |
Generic PandocError Source # | |
Defined in Text.Pandoc.Error type Rep PandocError :: * -> * # from :: PandocError -> Rep PandocError x # to :: Rep PandocError x -> PandocError # | |
Exception PandocError Source # | |
Defined in Text.Pandoc.Error | |
MonadError PandocError PandocPure # | |
Defined in Text.Pandoc.Class throwError :: PandocError -> PandocPure a # catchError :: PandocPure a -> (PandocError -> PandocPure a) -> PandocPure a # | |
MonadError PandocError PandocIO # | |
Defined in Text.Pandoc.Class throwError :: PandocError -> PandocIO a # catchError :: PandocIO a -> (PandocError -> PandocIO a) -> PandocIO a # | |
type Rep PandocError Source # | |
Defined in Text.Pandoc.Error |
handleError :: Either PandocError a -> IO a Source #
Handle PandocError by exiting with an error message.