diff options
| author | John MacFarlane <jgm@berkeley.edu> | 2017-05-02 16:00:04 +0200 |
|---|---|---|
| committer | John MacFarlane <jgm@berkeley.edu> | 2017-05-02 16:00:04 +0200 |
| commit | cd2551c16c1da0404b8de182f17160aebb69219d (patch) | |
| tree | b6e959c06a95cfb8f8ae1b9ea5ac4c2ac78dacea /src/Text/Pandoc/Error.hs | |
| parent | 022d58e02a6276aa830639ad641aae1542731bbe (diff) | |
Added PandocResourceNotFound error.
Use this instead of PandocIOError when a resource is not
found in path.
This improves the error message in this case, see #3629.
Diffstat (limited to 'src/Text/Pandoc/Error.hs')
| -rw-r--r-- | src/Text/Pandoc/Error.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Error.hs b/src/Text/Pandoc/Error.hs index 135cb3945..a6db5e047 100644 --- a/src/Text/Pandoc/Error.hs +++ b/src/Text/Pandoc/Error.hs @@ -58,6 +58,7 @@ data PandocError = PandocIOError String IOError | PandocPDFError String | PandocFilterError String String | PandocCouldNotFindDataFileError String + | PandocResourceNotFound String | PandocAppError String deriving (Show, Typeable, Generic) @@ -94,6 +95,8 @@ handleError (Left e) = filtername ++ ":\n" ++ msg PandocCouldNotFindDataFileError fn -> err 97 $ "Could not find data file " ++ fn + PandocResourceNotFound fn -> err 99 $ + "File " ++ fn ++ " not found in resource path" PandocAppError s -> err 1 s err :: Int -> String -> IO a |
