[jdom-interest] NoSuch*Exceptions in JDOM
dave at greatchiro.com
Fri Jun 23 01:01:15 PDT 2000
I suggest a new method following the java.util.Properties pattern meets the
underlying need and solves your problem. Namely: public Element getChild(String
aString, Object defaultValue). It does not throw a NoSuchElementException and can
return a null, "" or 0 as appropriate.. --GreatOne--
Simon Rade wrote:
> Element's methods getAttribute() and getChild() now throws
> NoSuchElementException and NoSuchAttributeException.
> Do you think this is better than returning null in such cases?
> Since it often happens that you don't know whether child or attribute
> exists and it is very awkward to handle those Exceptions.
> To control your jdom-interest membership:
More information about the jdom-interest