What are Chained Exceptions?

What are Chained Exceptions?

Example of a chained exception:
try
{
}
catch (IOException e)
{
   throw new xxxException("Other IOException", e);
}

When an application responds to an exception by throwing another exception, it is very useful to know when an exception caused another. Chained Exceptions help the programmer do this.

The following are the methods and constructors in Throwable that support chained exceptions:

1. Throwable getCause()
2. Throwable initCause(Throwable)
3. Throwable(String, Throwable)
4. Throwable(Throwable)
What is the purpose of the finally clause of a try-catch-finally statement?
Purpose of the finally clause - The finally block is the region where the code that needs to be executed under any circumstance is written...
Purpose of Event object
Purpose of Event object - EventObjects represent events. Applications subclass this class to add event specific information...
What is an action event?
What is an action event? - An action event is a semantic event which indicates that a component-defined action occured...
Post your comment