commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Graham <grahamdavid1...@yahoo.com>
Subject Re: [DBUtils] vendorCode in SQLException [Virus checked]
Date Wed, 16 Feb 2005 14:15:22 GMT
Please open a bugzilla ticket for this issue.  For now you can override
rethrow() but we should copy the SQLState and vendor code into the new
exception before throwing it.

Thanks!
David

--- Ulrich.Kleeberger@witt-weiden.de wrote:

> 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
> 
> 



		
__________________________________ 
Do you Yahoo!? 
All your favorites on one personal page  Try My Yahoo!
http://my.yahoo.com 

---------------------------------------------------------------------
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