1.

What Is Exception Propagation?

Answer»

When an exceptional condition OCCURS within a method, the method (where the exception occurred) creates an Exception Object and throws it. The created exception object contains information about the error, its type and the state of the program when the error occurred. 

The method where the exception is thrown may handle that exception itself or PASS it on. In case it passes it on, run time system goes through the method HIERARCHY that had been called to get to the current method to search for a method that can handle the exception.

If your program is not able to CATCH any particular exception, that will ultimately be processed by the default handler. This process of going through the method stack is known as Exception propagation.

When an exceptional condition occurs within a method, the method (where the exception occurred) creates an Exception Object and throws it. The created exception object contains information about the error, its type and the state of the program when the error occurred. 

The method where the exception is thrown may handle that exception itself or pass it on. In case it passes it on, run time system goes through the method hierarchy that had been called to get to the current method to search for a method that can handle the exception.

If your program is not able to catch any particular exception, that will ultimately be processed by the default handler. This process of going through the method stack is known as Exception propagation.



Discussion

No Comment Found