Frank Schönheit wrote:
 exception UnknownAttributeException: com::sun::star::uno::Exception


Given that there is a UnknownPropertyException, I wonder whether it
should be reused. I misses the property name, but might in theory
already be used to indicate that an attribute is optional. (At least I
saw code which suggests this in the PropertySetMixing implementation,
though I didn't find such an attribute.)

If we'd introduce UnknownAttributeException and allow it at
setters/getters, e.g.

interface XFoo
{
  [attribute] string Bar
  {
    set raises (UnknownAttributeException);
    set raises (UnknownAttributeException);
  };
};

then at least places as the PropertySetMixin implementation need to be
adjusted.

Personally, I'd prefer having an UnknownAttributeException over re-using
UnknownPropertyException, for clarity reasons. Other opinions?

I'd prefer to stick with UnknownPropertyException here, for the reasons you already stated: UnknownPropertyException is already used in combination with attributes, namely to model optional attributes.

(Besides, my current understanding of how exception mechanisms for programming environments should be designed tells me that the "checked" com.sun.star.beans.UnknownPropertyException and its use at com.sun.star.beans.XPropertySet.addPropertyChangeListener is a mistake. Hence, we should not make the situation worse by introducing a "checked" UnknownAttributeException as the next mistake).

Turns out I did not look very thoroughly at your initial posting...

-Stephan

Thanks & Ciao
Frank

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to