add new features...they don't break the build, but need to check if they work...
[IRC.git] / Robust / src / Main / Main.java
index a4e54b0d396ae3180f3fb3ebd70ce79311cf2964..4b70f6e75e9bdf032f78415aec2d9a1b1b13734f 100644 (file)
@@ -479,8 +479,18 @@ public class Main {
   }
 
   public static void loadClass(State state, BuildIR bir, String sourcefile) {
-    ParseNode pn=readSourceFile(state, sourcefile);
-    bir.buildtree(pn, null);
+    try {
+      ParseNode pn=readSourceFile(state, sourcefile);
+      bir.buildtree(pn, null);
+    } catch (Exception e) {
+      System.out.println("Error in sourcefile:"+sourcefile);
+      e.printStackTrace();
+      System.exit(-1);
+    } catch (Error e) {
+      System.out.println("Error in sourcefile:"+sourcefile);
+      e.printStackTrace();
+      System.exit(-1);
+    }
   }
 
   /** Reads in a source file and adds the parse tree to the state object. */