commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ulrich.Kleeber...@witt-weiden.de
Subject Antwort: Re: [DBUtils] vendorCode in SQLException [Virus checked]
Date Thu, 17 Feb 2005 07:23:20 GMT
ok. done.

uli




David Graham <grahamdavid1980@yahoo.com> 
16.02.05 15:15
Bitte antworten an
"Jakarta Commons Users List" <commons-user@jakarta.apache.org>


An
Jakarta Commons Users List <commons-user@jakarta.apache.org>
Kopie

Thema
Re: [DBUtils] vendorCode in SQLException [Virus checked]






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




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