From f94f45f73f0e636d6f8678a0e5ce7fd70075de20 Mon Sep 17 00:00:00 2001 From: Sida Wang Date: Fri, 5 Aug 2016 15:09:40 -0700 Subject: [PATCH] error value, more information etc. --- .gitignore | 1 + .../nlp/sempre/interactive/actions/ActionExecutor.java | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index fc18946..1835098 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ fig sfig refdb virtuoso-opensource +shrdlurn_output classes libsempre diff --git a/src/edu/stanford/nlp/sempre/interactive/actions/ActionExecutor.java b/src/edu/stanford/nlp/sempre/interactive/actions/ActionExecutor.java index 57c38b8..78fd609 100644 --- a/src/edu/stanford/nlp/sempre/interactive/actions/ActionExecutor.java +++ b/src/edu/stanford/nlp/sempre/interactive/actions/ActionExecutor.java @@ -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())); } }