Sun, 23 May 2010 12:46:02 +0100
Remove rawExceptions flag, always print exception's stack trace if it has one
lvm.js | file | annotate | diff | comparison | revisions |
--- a/lvm.js Sun May 23 02:38:45 2010 +0100 +++ b/lvm.js Sun May 23 12:46:02 2010 +0100 @@ -14,7 +14,7 @@ var OP_CLOSURE = 36; var debugMode = false; -var rawExceptions = true; +var rawExceptions = false; function LValue(type, value) { @@ -417,15 +417,12 @@ var f = new LFunction(c, default_environment); -if(rawExceptions) +try{ testvm.run(f); -else +} +catch(e) { - try{ - testvm.run(f); - } - catch(e) - { - print("Error: " + e); - } + print("Error: " + e); + if(stack in e) + print(e.stack); }