Raise exception when .inc file isn't found
authorunc0rr
Mon, 30 Apr 2012 16:55:02 +0400
changeset 6964 6dde80ae7049
parent 6963 0c181b88daff
child 6965 5718ec36900c
Raise exception when .inc file isn't found
tools/PascalPreprocessor.hs
--- a/tools/PascalPreprocessor.hs	Sun Apr 29 21:17:27 2012 +0200
+++ b/tools/PascalPreprocessor.hs	Mon Apr 30 16:55:02 2012 +0400
@@ -74,7 +74,7 @@
         char '"'
         spaces
         char '}'
-        f <- liftIO (readFile fn)
+        f <- liftIO (readFile fn `catch` error ("File not found: " ++ fn))
         c <- getInput
         setInput $ f ++ c
         return ""