Hi Mathias,

>>>    void approveInsertElement( [in] ContainerEvent Event )
>>>      raises ( VetoException, WrappedTargetException );
>>
>>Hmm. Would require to move css.util.VetoException from offapi to udkapi.
>>Sounds reasonable to me (missed a generic "VetoException" more than
>>once). Opinions?
> 
> Meanwhile I consider exceptions to be the wrong way to manage a veto.
> This will prevent all languages from using this interface that don't
> support exceptions except by catching them for an internal error
> handling, like e.g. OOo Basic. I would opt for a return value instead.

An exception allows to specify at least an error message, plus a context
(the component which vetoed), which I both consider useful in some
cases. So, I would use an exception for the return value, then - which
is quite weird.

Not to mention that exceptions allow for "polymorphism" in that you can
throw derived exceptions with additional information, which isn't
possible with return values.


Seeing it this way, and given that other Basic dialects nowadays support
modern constructs like try-catch, I really think we should not limit UNO
API design to the constraints of a particular UNO language binding, but
improve this binding instead.

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer         [EMAIL PROTECTED] -
- Sun Microsystems                      http://www.sun.com/staroffice -
- OpenOffice.org Database                   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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

Reply via email to