Exception Handling in Action

Here we will illustrate a simple program to test exceptions and see what type of information is recovered.This program allows a user to enter two values and attempts to divide them. It then reports all the related exception information in the page.

You can easily prevent this exception from occurring by using extra code-safety checks, or you can elegantly resolve it by using the validation controls.

As soon as the error occurs, execution is transferred to an exception handler. The code in the try block is not completed.

Scroll to Top