The CORBA standard precisely defines (24.12.1) that user-defined
exceptions in an IDL file are mapped to Java exceptions derived from
org.omg.CORBA.UserException, meaning that they are "checked
exceptions" and must hence be handled. We have the problem that our
IDL file defines exceptions which clearly come from incorrect usage of
the remote object; we hence don't want to force the Java client to
always handle such exceptions. In one word, we would like the ability
to define IDL exceptions which would be mapped to Java unchecked
exceptions, e.g. childs of java.lang.RunTimException.
Is this possible? Any work around?
One of the solutions mentioned to me was to use e.g.
org.omg.CORBA.SystemException for such cases. I don't like
this very much, because 1) such exceptions have nothing to
do with CIRBA 2) they can't be documented in the IDL (?).
Thanks for any help