Skip to content

Commit d46b555

Browse files
committed
Catch an error with some extra info
1 parent bc8413b commit d46b555

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

experiments/Synth/src/evaluator.jl

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,15 @@ function evaluate_qn(problem::UndirectedProblem, expr, vertex_names)
8181
sat_examples = BitVector[]
8282

8383
function _eval_1_dir(in, out)
84-
res = interpret(expr, in[:state], vertex_names)
85-
expected = out[:state][findfirst(==(problem.name), vertex_names)]
86-
success = expected == res
87-
88-
return success
84+
try
85+
res = interpret(expr, in[:state], vertex_names)
86+
expected = out[:state][findfirst(==(problem.name), vertex_names)]
87+
success = expected == res
88+
89+
return success
90+
catch
91+
error("$(problem.name) $(in[:state]) $expr")
92+
end
8993
end
9094

9195
for example problem.examples

0 commit comments

Comments
 (0)