pandoc-1.19.2.4: Conversion between markup formats

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

Text.Pandoc.Error

Description

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

Synopsis

- data PandocError
  - = ParseFailure String
  - | ParsecError Input ParseError
- handleError :: Either PandocError a -> a

# Documentation

data PandocError Source #

Constructors

ParseFailure String | Generic parse failure
ParsecError Input ParseError | Error thrown by a Parsec parser

Instances

Show PandocError Source # |
Methods showsPrec :: Int -> PandocError -> ShowS # show :: PandocError -> String # showList :: [PandocError] -> ShowS #
Generic PandocError Source # |
Associated Types type Rep PandocError :: * -> * # Methods from :: PandocError -> Rep PandocError x # to :: Rep PandocError x -> PandocError #
Exception PandocError Source # |
Methods toException :: PandocError -> SomeException # fromException :: SomeException -> Maybe PandocError # displayException :: PandocError -> String #
type Rep PandocError Source # |
type Rep PandocError

handleError :: Either PandocError a -> a Source #

An unsafe method to handle `PandocError`s.