|
From: <jue...@we...> - 2004-02-03 06:57:48
|
Don't bother, I've already changed that yesterday :-)
=20
Juergen
=20
________________________________
Von: spr...@li... im Auftrag =
von Colin Sampaleanu
Gesendet: Di 03.02.2004 05:36
An: spr...@li...
Betreff: Re: [Springframework-developer] NestedRuntimeException
Oliver Hutchison wrote:
>I'm currently writing a simple little query system which will some =
times
>execute queries using the JdbcTemplate but also some times need to do
>direct execution using JDBC.
>
>It the part of this code that is responsible for catching exceptions =
and
>giving the user appropriate error messages I have had to write two sets
>of code to find the root cause of exceptions as the
>NestedRuntimeException in Spring has it's getRootCause method and most
>of the other exception I encounter use getCause.
>
>I think it would be great if Spring also supported the Java 1.4 style
>getCause method. Why not just override the getCause method with a call
>to getRootCause? Or if you didn't want to do that this could be added
>quite easily using reflection. Something like this in the constructor
>should do the trick:
> =20
> try {
> this.getClass().getMethod("initCause", new Class[]
>{Throwable.class})
> .invoke(this, new Object[] {e});
> } catch(Exception ex) {
> // guess it's not 1.4+ =20
> }
>
>
>Ollie
>=20
>
Coincidentally, we had a bit of a discussion about this w/regards to
NestedCheckedException, just a couple of days ago.
I should be able to find time tomorrow to to change
NestedCheckedException and NestedRuntimeException in this fashion...
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|