File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
dynamicjava/src/edu/rice/cs/dynamicjava/interpreter Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 8080import edu .rice .cs .plt .tuple .Option ;
8181import edu .rice .cs .plt .lambda .Lambda ;
8282import edu .rice .cs .plt .lambda .Lambda2 ;
83+ import edu .rice .cs .plt .lambda .WrappedException ;
8384
8485import edu .rice .cs .dynamicjava .Options ;
8586import edu .rice .cs .dynamicjava .symbol .*;
@@ -1583,13 +1584,21 @@ private Type handleBooleanExpression(BinaryExpression node) {
15831584
15841585 private void evaluateConstantExpression (BinaryExpression node ) {
15851586 if (hasValue (node .getLeftExpression ()) && hasValue (node .getRightExpression ())) {
1586- setValue (node , new ExpressionEvaluator (RuntimeBindings .EMPTY , opt ).value (node ));
1587+ try {
1588+ Object val = new ExpressionEvaluator (RuntimeBindings .EMPTY , opt ).value (node );
1589+ setValue (node , val );
1590+ }
1591+ catch (WrappedException e ) { /* failed to evaluate -- just ignore */ }
15871592 }
15881593 }
15891594
15901595 private void evaluateConstantExpression (UnaryExpression node ) {
15911596 if (hasValue (node .getExpression ())) {
1592- setValue (node , new ExpressionEvaluator (RuntimeBindings .EMPTY , opt ).value (node ));
1597+ try {
1598+ Object val = new ExpressionEvaluator (RuntimeBindings .EMPTY , opt ).value (node );
1599+ setValue (node , val );
1600+ }
1601+ catch (WrappedException e ) { /* failed to evaluate -- just ignore */ }
15931602 }
15941603 }
15951604
You can’t perform that action at this time.
0 commit comments