git.iko.soy/typeable/pandoc
on master help sign in
Add ParseError to PandocExecutionError.

This will be unified with Text.Pandoc.Error eventually. But I'm building it out here so as not to interfere with other modules that might be using the error module currently.

commitd447552be1c60d5a6ba15cd2a91395e32c8e0554 authorJesse Rosenthal <jrosenthal@jhu.edu> dateMon 28 Nov 2016, 16:54 (10 years ago) parentb34bb8b
1 file changed+3−1
src/Text/Pandoc/Class.hs+3−1
src/Text/Pandoc/Class.hs+3−1
@@ -112,6 +112,7 @@ getPOSIXTime = utcTimeToPOSIXSeconds <$> getCurrentTime
112112-- We can add to this as we go
113113data PandocExecutionError = PandocFileReadError FilePath
114114 | PandocShouldNeverHappenError String
115+ | PandocParseError String
115116 | PandocSomeError String
116117 deriving (Show, Typeable)
117118
@@ -133,8 +134,9 @@ runIOorExplode ma = do
133134 eitherVal <- runIO ma
134135 case eitherVal of
135136 Right x -> return x
136− Left (PandocFileReadError fp) -> error $ "promple reading " ++ fp
137+ Left (PandocFileReadError fp) -> error $ "problem reading " ++ fp
137138 Left (PandocShouldNeverHappenError s) -> error s
139+ Left (PandocParseError s) -> error $ "parse error" ++ s
138140 Left (PandocSomeError s) -> error s
139141
140142newtype PandocIO a = PandocIO {