add new features...they don't break the build, but need to check if they work...
[IRC.git] / Robust / src / IR / Tree / BuildIR.java
index 8a97ce799400375e489394114443638db27bb92d..e9176923549279c3c4d800eebf261dd1c7b08f0c 100644 (file)
@@ -581,9 +581,19 @@ public class BuildIR {
     ParseNode headern=pn.getChild("method_header");
     ParseNode bodyn=pn.getChild("body");
     MethodDescriptor md=parseMethodHeader(headern);
-    BlockNode bn=parseBlock(bodyn);
-    cn.addMethod(md);
-    state.addTreeCode(md,bn);
+    try {
+      BlockNode bn=parseBlock(bodyn);
+      cn.addMethod(md);
+      state.addTreeCode(md,bn);
+    } catch (Exception e) {
+      System.out.println("Error with method:"+md.getSymbol());
+      e.printStackTrace();
+      throw new Error();
+    } catch (Error e) {
+      System.out.println("Error with method:"+md.getSymbol());
+      e.printStackTrace();
+      throw new Error();
+    }
   }
 
   private void parseConstructorDecl(ClassDescriptor cn, ParseNode pn) {