[jdom-interest] Push toward a 1.0 API

Jason Hunter jhunter at servlets.com
Thu Apr 11 16:17:32 PDT 2002

> The root-cause methods in JDOMException match the ones in JDK 1.4, but we
> don't use the base implementation at all, because then we'd be dependent on
> 1.4. That's fine. 


> - The printStackTrace() methods should automatically pick up JDK 1.4 nested
> exceptions, since the 1.4 spec says that Throwable.printStackTrace() will
> print the nested stack trace too. So even though our getNestedException()
> doesn't know about 1.4 nested exceptions, this should work fine.


> - On the other hand, the 1.4 spec does not say that getMessage() will
> recurse to nested exceptions. So our getMessage() method will stop when it
> hits a 1.4 nested exception. In this case we could consider checking for 1.4
> nested exceptions (via reflection), and appending their messages. On the
> other hand, it is a little disturbing that our getMessage() method recurses
> while the 1.4 one doesn't. IIRC, I added this because the error messages
> were extremely unhelpful and frustrating, because the real error was hidden.
> So I wouldn't want to change this. Not sure what the right solution is here.

I like the message recursion and wouldn't want to give it up.  I don't
think we need to change the behavior of exception classes outside our
control though, so leaving it alone is probably best.

I'll cross this off the TODO.  Thanks!


More information about the jdom-interest mailing list