Results 1 to 1 of 1
Thread: How to use chained exceptions
-
How to use chained exceptions
Many times you need to catch one type of exception and then throw another one without losing information of first exception. In that case chained exceptions are used.
Java Code:public void myMethod() throws MyException{ try { // write your code here } catch(YourException e) { throw new MyException(e); } }
Similar Threads
-
Better way to handle exceptions
By javaplus in forum Advanced JavaReplies: 2Last Post: 01-16-2008, 06:47 PM -
question regarding exceptions..
By SCS17 in forum New To JavaReplies: 3Last Post: 11-17-2007, 09:31 AM -
Runtime Exceptions
By Java Tip in forum Java TipReplies: 0Last Post: 11-12-2007, 10:31 AM -
how to handle exceptions
By paty in forum Advanced JavaReplies: 2Last Post: 08-05-2007, 04:17 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks