Nested exceptions in SAX

Norman Walsh <[email protected]> Thu, 23 Feb 2006 09:52:01 -0500
Newsgroups gmane.text.xml.sax.devel
Message-ID <[email protected]>
--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

The following bug has been reported against JAXP:

  SAXException can take a nested exception, but it doesn't implement
  the getCause method, so it doesn't participate in the exception
  nesting mechanism introduced in JDK 1.4.

  Because of this, when one prints out "e.printStackTrace()", it
  doesn't show exceptions nested inside SAXException.

the proposed fix for this is simply to add

public Throwable getCause() {
  return exception;
}

to org.xml.sax.SAXException.

I don't believe that this introduces any compatibility problems
(getCause() is already inherited from Throwable).

That said, as the spec lead for JAXP, I'm very reluctant to introduce
changes into the endorsed API no matter how small without community
support.

What say you?

                                        Be seeing you,
                                          norm

=2D-=20
Norman Walsh <[email protected]> | A life, admirable at first sight, may
http://nwalsh.com/            | have cost so much in imposed
                              | liabilities, chores and self-abasement,
                              | that, brilliant though it appears, it
                              | cannot be considered other than a
                              | failure. Another, which seems to have
                              | misfired, is in reality a triumphant
                              | success, because it has cost so
                              | little.--Henry De Montherlant

--=-=-=
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (GNU/Linux)

iD8DBQBD/cwROyltUcwYWjsRAub1AKCUQH0FJHHtvhJ4GZo7/dG8g562CQCdFi6H
KmUfYheg2DTOq0L8lO0JI64=
=focc
-----END PGP SIGNATURE-----
--=-=-=--


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
List: sax-devel, [email protected]
See:  http://www.saxproject.org/
https://lists.sourceforge.net/lists/listinfo/sax-devel