public TypeValuePair evaluateTyped ()
{
try
{
final TypeValuePair typeValuePair = rootReference.evaluate();
if (typeValuePair == null)
{
// Should no longer happen..
return new TypeValuePair
(ErrorType.TYPE, LibFormulaErrorValue.ERROR_NA_VALUE);
}
if(typeValuePair.getType().isFlagSet(Type.ERROR_TYPE))
{
Log.debug ("Error: " + typeValuePair.getValue());
}
return typeValuePair;
}
catch(EvaluationException ee)
{
Log.warn ("Evaluation failed: ", ee);
return new TypeValuePair(ErrorType.TYPE, ee.getErrorValue());
}
catch (Exception e)
{
Log.warn ("Evaluation failed: ", e);
return new TypeValuePair(ErrorType.TYPE, LibFormulaErrorValue.ERROR_UNEXPECTED_VALUE);
}
}