You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by John Chien <jo...@ncmail.net> on 2008/07/03 20:33:29 UTC
SQLException
According to the IBatis Developer Guide, the insert(), update() ... etc
will throw SQLException.
However, when I use try and catch block to catch the SQLException, I was
told that the exception never throws.
What is the real exception throws from those statement ?
Thanks,
John Chien
Re: SQLException
Posted by John Chien <jo...@ncmail.net>.
Thanks. I found that is DatabaseAccessException.
Chris O'Connell wrote:
> Are you using Spring? The Spring SqlMapClientTemplate converts all those
> SQLExceptions into a runtime exception, so your IDE won't see any exception
> that you need to 'catch'.
>
> -----Original Message-----
> From: John Chien [mailto:john.chien@ncmail.net]
> Sent: Thursday, July 03, 2008 1:33 PM
> To: user-java@ibatis.apache.org
> Subject: SQLException
>
> According to the IBatis Developer Guide, the insert(), update() ... etc
> will throw SQLException.
>
> However, when I use try and catch block to catch the SQLException, I was
> told that the exception never throws.
>
> What is the real exception throws from those statement ?
>
> Thanks,
>
> John Chien
>
>
>
> No virus found in this incoming message.
> Checked by AVG.
> Version: 8.0.134 / Virus Database: 270.4.4/1531 - Release Date: 7/2/2008
> 7:02 PM
>
>
RE: SQLException
Posted by Chris O'Connell <oc...@gorillachicago.com>.
Are you using Spring? The Spring SqlMapClientTemplate converts all those
SQLExceptions into a runtime exception, so your IDE won't see any exception
that you need to 'catch'.
-----Original Message-----
From: John Chien [mailto:john.chien@ncmail.net]
Sent: Thursday, July 03, 2008 1:33 PM
To: user-java@ibatis.apache.org
Subject: SQLException
According to the IBatis Developer Guide, the insert(), update() ... etc
will throw SQLException.
However, when I use try and catch block to catch the SQLException, I was
told that the exception never throws.
What is the real exception throws from those statement ?
Thanks,
John Chien
No virus found in this incoming message.
Checked by AVG.
Version: 8.0.134 / Virus Database: 270.4.4/1531 - Release Date: 7/2/2008
7:02 PM