error value, more information etc.

This commit is contained in:
Sida Wang 2016-08-05 15:09:40 -07:00
parent 19b0040e66
commit f94f45f73f
2 changed files with 6 additions and 2 deletions

1
.gitignore vendored
View File

@ -3,6 +3,7 @@ fig
sfig
refdb
virtuoso-opensource
shrdlurn_output
classes
libsempre

View File

@ -46,12 +46,15 @@ public class ActionExecutor extends Executor {
// denotation (unlike for lambda DCS).
FlatWorld world = FlatWorld.fromContext(opts.FlatWorldType, context);
formula = Formulas.betaReduction(formula);
performActions((ActionFormula)formula, world);
try {
performActions((ActionFormula)formula, world);
return new Response(new StringValue(world.toJSON()));
} catch (Exception e) {
// Comment this out if we expect lots of innocuous type checking failures
if (opts.printStackTrace) e.printStackTrace();
if (opts.printStackTrace) {
LogInfo.log("tried to execute: " + formula.toString());
e.printStackTrace();
}
return new Response(ErrorValue.badJava(e.toString()));
}
}