# HG changeset patch # User Matthew Wild # Date 1274615162 -3600 # Node ID 62f3df8ed204b4a15bd3d580a69f02277ab6cd5c # Parent d14b47c3870f4034bde991c5e2ad92df0c994969 Remove rawExceptions flag, always print exception's stack trace if it has one diff -r d14b47c3870f -r 62f3df8ed204 lvm.js --- 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); }