better error message for unexpected pause()
authorcrawshaw <crawshaw@ibex.org>
Sat, 8 Jan 2005 10:02:48 +0000 (10:02 +0000)
committercrawshaw <crawshaw@ibex.org>
Sat, 8 Jan 2005 10:02:48 +0000 (10:02 +0000)
darcs-hash:20050108100248-2eb37-e876d94183853f9ec0b06bf5e90ac0673c660f69.gz

src/org/ibex/js/Interpreter.java

index 3fedf8f..02c35ed 100644 (file)
@@ -72,7 +72,7 @@ class Interpreter implements ByteCodes, Tokens, Pausable {
         switch(f.op[pc]) {
             case Tokens.RETURN: case ByteCodes.PUT: get = false; break;
             case ByteCodes.GET: case ByteCodes.CALL: get = true; break;
-            default: throw new Error("should never happen");
+            default: throw new Error("paused on unexpected bytecode: " + f.op[pc]);
         }
     }