diff --git a/main/src/com/google/refine/grel/ast/FieldAccessorExpr.java b/main/src/com/google/refine/grel/ast/FieldAccessorExpr.java index 7564accf9..13baf2021 100644 --- a/main/src/com/google/refine/grel/ast/FieldAccessorExpr.java +++ b/main/src/com/google/refine/grel/ast/FieldAccessorExpr.java @@ -63,17 +63,17 @@ public class FieldAccessorExpr implements Evaluable { if (ExpressionUtils.isError(o)) { return o; // bubble the error up } else if (o == null) { - return new EvalError("Cannot retrieve field from null"); + return null; } else if (o instanceof HasFields) { return ((HasFields) o).getField(_fieldName, bindings); } else if (o instanceof JSONObject) { try { return ((JSONObject) o).get(_fieldName); } catch (JSONException e) { - return new EvalError("Object does not have any field, including " + _fieldName); + return null; } } else { - return new EvalError("Object does not have any field, including " + _fieldName); + return null; } }