if (isPrimitive(result))
return result;
result = callToString(session, v, isolateId);
if (isPrimitive(result))
return result;
throw new RuntimeException(new PlayerFaultException(new ExceptionFault(ASTBuilder.getLocalizationManager().getLocalizedTextString("typeError"), false, null, isolateId))); //$NON-NLS-1$
}
else
{
Value result = callToString(session, v, isolateId);
if (isPrimitive(result))
return result;
result = callValueOf(session, v, isolateId);
if (isPrimitive(result))
return result;
throw new RuntimeException(new PlayerFaultException(new ExceptionFault(ASTBuilder.getLocalizationManager().getLocalizedTextString("typeError"), false, null, isolateId))); //$NON-NLS-1$
}
}