Sat, 22 May 2010 20:08:03 +0100
Add new debug option - rawExceptions - to prevent catching exceptions thrown by the VM, use for debugging the VM.
lvm.js | file | annotate | diff | comparison | revisions |
--- a/lvm.js Sat May 22 20:07:05 2010 +0100 +++ b/lvm.js Sat May 22 20:08:03 2010 +0100 @@ -11,6 +11,7 @@ var OP_CLOSURE = 36; var debugMode = false; +var rawExceptions = true; function LValue(type, value) { @@ -371,10 +372,15 @@ var f = new LFunction(c, default_environment); -try{ +if(rawExceptions) testvm.run(f); +else +{ + try{ + testvm.run(f); + } + catch(e) + { + print("Error: " + e); + } } -catch(e) -{ - print("Error: " + e); -}