From de5102a22c08395fad58d16c28ea8a8e98ebf7df Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 23 Feb 2017 16:21:49 +0100 Subject: Error: Changed PandocFileReadError to PandocIOError --- src/Text/Pandoc/Error.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Text/Pandoc') diff --git a/src/Text/Pandoc/Error.hs b/src/Text/Pandoc/Error.hs index 65f912c88..552fc9c4b 100644 --- a/src/Text/Pandoc/Error.hs +++ b/src/Text/Pandoc/Error.hs @@ -39,10 +39,11 @@ import Data.Generics (Typeable) import GHC.Generics (Generic) import Control.Exception (Exception) import Text.Pandoc.Shared (err) +import System.IO.Error (IOError) type Input = String -data PandocError = PandocFileReadError FilePath +data PandocError = PandocIOError String IOError | PandocShouldNeverHappenError String | PandocSomeError String | PandocParseError String @@ -57,7 +58,7 @@ handleError :: Either PandocError a -> IO a handleError (Right r) = return r handleError (Left e) = case e of - PandocFileReadError fp -> err 61 $ "problem reading " ++ fp + PandocIOError _ err' -> ioError err' PandocShouldNeverHappenError s -> err 62 s PandocSomeError s -> err 63 s PandocParseError s -> err 64 s -- cgit v1.2.3