+ e.getMessage());
}
} catch (com.sun.star.lang.IllegalAccessException e) {
//TODO Clarify whether PropertyVetoException is the correct
// exception to throw when trying to set a read-only property:
throw new PropertyVetoException(
"cannot set read-only property " + name, object);
} catch (WrappedTargetRuntimeException e) {
//FIXME A WrappedTargetRuntimeException from XIdlField2.get is not
// guaranteed to originate directly within XIdlField2.get (and thus
// have the expected semantics); it might also be passed through
// from lower layers.
if (new Type(UnknownPropertyException.class).isSupertypeOf(
AnyConverter.getType(e.TargetException))
&& (p.property.Attributes & PropertyAttribute.OPTIONAL) != 0)
{
throw new UnknownPropertyException(name, object);
} else if (new Type(PropertyVetoException.class).isSupertypeOf(
AnyConverter.getType(e.TargetException))
&& ((p.property.Attributes
& PropertyAttribute.CONSTRAINED)
!= 0))
{
throw new PropertyVetoException(name, object);
} else {
throw new WrappedTargetException(
e.getMessage(), object, e.TargetException);
}
}