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.
-Jignesh
-
Handling RuntimeException (1 messages)
- Posted by: Jignesh Ptel
- Posted on: July 26 2005 03:18 EDT
Threaded Messages (1)
- Handling RuntimeException by Rakesh Malpani on July 26 2005 09:35 EDT
-
Handling RuntimeException[ Go to top ]
- Posted by: Rakesh Malpani
- Posted on: July 26 2005 09:35 EDT
- in response to Jignesh Ptel
Its not different than catching the regular exceptions.. you have to write a catch block. Worst case (not suggested) catch exception of type 'Exception' all exceptions checked and unchecked exceptions are inherited from this class, so, you see, it always works, but as mentioned its better to catch the perticular exceptions you want in the required position in code.
Hope it helps.
Rakesh.