From 1151fab5ad3b44338590198ea876bb24b42b81fd Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Mon, 11 Feb 2008 01:15:56 +0000 Subject: [PATCH] Changed the error reporting so that we at least print the meta tag if we can't open the file to find the line --- common/Errors.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/Errors.hs b/common/Errors.hs index 38d87a4..55790e4 100644 --- a/common/Errors.hs +++ b/common/Errors.hs @@ -61,7 +61,7 @@ dieIO :: (Monad m, MonadIO m) => ErrorReport -> m a dieIO (Just m@(Meta (Just fn) line column),s) = liftIO $ -- If we can't read the file successfully, still print our original error -- rather than a "can't read file" error: - do fileContents <- catch (readFile fn) (\_ -> printError s) + do fileContents <- catch (readFile fn) (\_ -> printError (show m ++ s)) let startingLine = max 1 (line - contextLines) let lines = map replaceTabs $ getLines fileContents (startingLine) ((2 * contextLines) + 1) putStrLn $ fn ++ ":"