a start on error inject for SSJava
[IRC.git] / Robust / src / Main / Main.java
index 61e898bc814160363e09799ae9fa2247d6bd4d8a..019e7e401fec55f4ddf33ee21300c2fca6d18bfa 100644 (file)
@@ -368,6 +368,12 @@ public class Main {
         state.SSJAVA = true;
       } else if (option.equals("-ssjavadebug")) {
         state.SSJAVADEBUG = true;
+
+      } else if( option.equals( "-ssjava-inject-error" ) ) {
+        state.SSJAVA_INJECT_ERROR   = true;
+        state.SSJAVA_INV_ERROR_PROB = Integer.parseInt( args[++i] );
+        state.SSJAVA_ERROR_SEED     = Integer.parseInt( args[++i] );
+
       }else if (option.equals("-printlinenum")) {
         state.LINENUM=true;
       } else if (option.equals("-help")) {
@@ -699,6 +705,11 @@ public class Main {
         bc.registerExtension( bcx );
       }
 
+      if( state.SSJAVA_INJECT_ERROR ) {
+        BCXSSJavaInjectError bcx = new BCXSSJavaInjectError( state, bc );
+        bc.registerExtension( bcx );
+      }
+
       bc.buildCode();
       State.logEvent("Done With BuildCode");