# HG changeset patch # User Matthew Wild # Date 1274555283 -3600 # Node ID 9e62bc13b30df389fdcb3e3d545047582ae87949 # Parent 5c9d8a65c87da2878e10dbe84bc370bbbc8ecbb4 Add new debug option - rawExceptions - to prevent catching exceptions thrown by the VM, use for debugging the VM. diff -r 5c9d8a65c87d -r 9e62bc13b30d lvm.js --- 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); -}