shark and null pointers, elegant solution?

David Delbecq <[email protected]> Thu, 1 Sep 2005 16:13:44 +0200
Newsgroups gmane.comp.java.enhydra.shark
Organization Institut Royal Météorologique
Message-ID <[email protected]>
Hi again,

Another curiosity with shark corba interface.
corba in itself does not allow null pointer to be returned
from methods. However lotso f shark methods seems to return
null when no data is available (like no description for an activity
or no activity associated with AuditEvent).
Every time this happens, it throws a BAD_PARAM Corba exception.
Does anyone have an elegant way to handle those problems? putting bunches

of try {
   activity = event.activity();
} catch (BAD_PARAM p){
    if (p.minor != 201)
	throw p;
}

around each method subject to sending a null is a pain in the ass :s

Thanks.
-- 
David Delbecq
Royal Meteorological Institute of Belgium

-
Is there life after /sbin/halt -p?
message-footer.txt (text/plain, 271 B)
--
You receive this message as a subscriber of the [email protected] mailing list.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws