commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ulrich.Kleeber...@witt-weiden.de
Subject [DBUtils] vendorCode in SQLException [Virus checked]
Date Wed, 16 Feb 2005 06:49:28 GMT
hi guys,

i have a problem with the QueryRunner and SQLExcpetions. If i run an 
update-statement with the
QueryRunner and the statement throws an SQLException i can't get the 
vendor code from the exception.
i think because of the 
protected void rethrow(SQLException cause, String sql, Object[] params) 
Method. 
if i change the code before the throw  to :

SQLException e = new SQLException(msg.toString(), cause.getSQLState(), 
cause.getErrorCode() );
 e.setNextException(cause);

throw e;

i get the vendor code.

does anything say its not good to change the code like above?

ciao uli

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message