This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes handling RuntimeException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "handling RuntimeException" Watch "handling RuntimeException" New topic
Author

handling RuntimeException

Jignesh Patel
Ranch Hand

Joined: Nov 03, 2001
Posts: 626

My application throws net.sf.hibernate.JDBCException e, which in turn throws java.sql.BatchUpdateException.

I want to catch above exception, but since it is RuntimeException, I couldn't.

Can anybody assist me to catch RuntimeException.
Kunaal A Trehan
Ranch Hand

Joined: Feb 04, 2004
Posts: 63
Hi
If u catch exception superclass u wud be able to
catch runtime exception also

Cheers
Kunal
 
Don't get me started about those stupid light bulbs.
 
subject: handling RuntimeException
 
Similar Threads
error in finally
Exception Exception is not compatible with throws clause in MyClass.myMethod()
RuntimeException
InterruptedException
exception