pandoc-2.9.2.1: Conversion between markup formats

Copyright | Copyright (C) 2006-2020 John MacFarlane
License | GNU GPL, version 2 or above
Maintainer | John MacFarlane <jgm@berkeley.edu>
Stability | alpha
Portability | portable
Safe Haskell | None
Language | Haskell2010

Text.Pandoc.Error

Description

This module provides a standard way to deal with possible errors encounted during parsing.

Synopsis

- data PandocError
  - = PandocIOError Text IOError
  - | PandocHttpError Text HttpException
  - | PandocShouldNeverHappenError Text
  - | PandocSomeError Text
  - | PandocParseError Text
  - | PandocParsecError Input ParseError
  - | PandocMakePDFError Text
  - | PandocOptionError Text
  - | PandocSyntaxMapError Text
  - | PandocFailOnWarningError
  - | PandocPDFProgramNotFoundError Text
  - | PandocPDFError Text
  - | PandocFilterError Text Text
  - | PandocCouldNotFindDataFileError Text
  - | PandocResourceNotFound Text
  - | PandocTemplateError Text
  - | PandocAppError Text
  - | PandocEpubSubdirectoryError Text
  - | PandocMacroLoop Text
  - | PandocUTF8DecodingError Text Int Word8
  - | PandocIpynbDecodingError Text
  - | PandocUnknownReaderError Text
  - | PandocUnknownWriterError Text
  - | PandocUnsupportedExtensionError Text Text
- handleError :: Either PandocError a -> IO a

# Documentation

data PandocError Source #

Constructors

PandocIOError Text IOError |
PandocHttpError Text HttpException |
PandocShouldNeverHappenError Text |
PandocSomeError Text |
PandocParseError Text |
PandocParsecError Input ParseError |
PandocMakePDFError Text |
PandocOptionError Text |
PandocSyntaxMapError Text |
PandocFailOnWarningError |
PandocPDFProgramNotFoundError Text |
PandocPDFError Text |
PandocFilterError Text Text |
PandocCouldNotFindDataFileError Text |
PandocResourceNotFound Text |
PandocTemplateError Text |
PandocAppError Text |
PandocEpubSubdirectoryError Text |
PandocMacroLoop Text |
PandocUTF8DecodingError Text Int Word8 |
PandocIpynbDecodingError Text |
PandocUnknownReaderError Text |
PandocUnknownWriterError Text |
PandocUnsupportedExtensionError Text Text |

#### Instances

Instances details

Show PandocError Source # |
Instance details Defined in Text.Pandoc.Error Methods showsPrec :: Int -> PandocError -> ShowS Source # show :: PandocError -> String Source # showList :: [PandocError] -> ShowS Source #
Generic PandocError Source # |
Instance details Defined in Text.Pandoc.Error Associated Types type Rep PandocError :: Type -> Type Source # Methods from :: PandocError -> Rep PandocError x Source # to :: Rep PandocError x -> PandocError Source #
Exception PandocError Source # |
Instance details Defined in Text.Pandoc.Error Methods toException :: PandocError -> SomeException Source # fromException :: SomeException -> Maybe PandocError Source # displayException :: PandocError -> String Source #
MonadError PandocError PandocPure Source # |
Instance details Defined in Text.Pandoc.Class.PandocPure Methods throwError :: PandocError -> PandocPure a Source # catchError :: PandocPure a -> (PandocError -> PandocPure a) -> PandocPure a Source #
MonadError PandocError PandocIO Source # |
Instance details Defined in Text.Pandoc.Class.PandocIO Methods throwError :: PandocError -> PandocIO a Source # catchError :: PandocIO a -> (PandocError -> PandocIO a) -> PandocIO a Source #
type Rep PandocError Source # |
Instance details Defined in Text.Pandoc.Error type Rep PandocError

handleError :: Either PandocError a -> IO a Source #

Handle PandocError by exiting with an error message.