浏览代码

better error printout

Pat Hickey 10 年之前
父节点
当前提交
95e0aa0e70
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/Gidl.hs

+ 2 - 1
src/Gidl.hs

@@ -126,7 +126,8 @@ run = do
   opts <- parseOpts args
   idl <- readFile (idlpath opts)
   case parseDecls idl of
-    Left e -> putStrLn e >> exitFailure
+    Left e -> putStrLn ("Error parsing " ++ (idlpath opts) ++ ": " ++ e)
+              >> exitFailure
     Right (te, ie) -> do
       when (debug opts) $ do
         putStrLn (ppShow te)