From f0f6967a1b9782b4c21ec9cac39248ece5229962 Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Sat, 6 Jul 2013 20:42:23 -0400 Subject: do work --- www/js/imachine.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'www/js') diff --git a/www/js/imachine.js b/www/js/imachine.js index 1d539dd..a256019 100644 --- a/www/js/imachine.js +++ b/www/js/imachine.js @@ -21,6 +21,9 @@ html5ks.imachine = (function () { case "undefined": break; case "string": // jump_out + if (!html5ks.data.imachine[inst]) { + throw new Error("label does not exist"); + } this.run(inst); break; case "object": @@ -69,7 +72,7 @@ html5ks.imachine = (function () { break; default: console.error("unknown imachine inst"); - console.error(inst); + console.log(inst); } } }.bind(this); -- cgit v1.2.3-54-g00ecf