summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-02-23 16:21:49 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2017-02-23 16:21:49 +0100
commitde5102a22c08395fad58d16c28ea8a8e98ebf7df (patch)
treee9f8a5f3851bf9b3c7c033cef2aa30ecfbea0416 /src/Text/Pandoc
parent4a9069130f8d53a1b417fc3e0fcf7da6d7d2c5dd (diff)
Error: Changed PandocFileReadError to PandocIOError
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Error.hs5
1 files changed, 3 insertions, 2 deletions
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