On 03/13/09 14:56, Frank Schönheit - Sun Microsystems Germany wrote:
At this point in time, you will want to deal with the unimplemented
method in a way that the caller (your test, for instance) notices that
the method, well, is not implemented yet.

In NetBeans, this is mimiced (when you ask NetBeans to create a body for
all missing abstract methods) by throwing a
UnsupportedOperationException with the message "Not yet implemented".
So, as your implementation evolves, you can replace those with real
implementations.

I just like this, and want to have something similar for my C++
components :)

Then why not simply use com.sun.star.uno.RuntimeException with Message "Not yet implemented"?

Of course, this is somewhat fragile, in that your test code needs to parse Message to find out the caught RuntimeException has the specific meaning (hoping that there is no other code somewhere that throws RuntimeExceptions with matching Message but different meaning).

However, that is not different from your NetBeans example: There, you have the same fragility checking whether a caught java.lang.UnsupportedExceptionOperation has your "Not yet implemented" meaning or is for example thrown by calling add on an immutable java.util.Collection instance.

-Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to