git.iko.soy/typeable/pandoc
on master help sign in
Error: Changed PandocFileReadError to PandocIOError
commitde5102a22c08395fad58d16c28ea8a8e98ebf7df authorJohn MacFarlane <jgm@berkeley.edu> dateThu 23 Feb 2017, 16:21 (10 years ago) parent4a90691
1 file changed+3−2
src/Text/Pandoc/Error.hs+3−2
src/Text/Pandoc/Error.hs+3−2
@@ -39,10 +39,11 @@ import Data.Generics (Typeable)
3939import GHC.Generics (Generic)
4040import Control.Exception (Exception)
4141import Text.Pandoc.Shared (err)
42+import System.IO.Error (IOError)
4243
4344type Input = String
4445
45−data PandocError = PandocFileReadError FilePath
46+data PandocError = PandocIOError String IOError
4647 | PandocShouldNeverHappenError String
4748 | PandocSomeError String
4849 | PandocParseError String
@@ -57,7 +58,7 @@ handleError :: Either PandocError a -> IO a
5758handleError (Right r) = return r
5859handleError (Left e) =
5960 case e of
60− PandocFileReadError fp -> err 61 $ "problem reading " ++ fp
61+ PandocIOError _ err' -> ioError err'
6162 PandocShouldNeverHappenError s -> err 62 s
6263 PandocSomeError s -> err 63 s
6364 PandocParseError s -> err 64 s