Catching an exception
If a method throws an exception, it must assume that exception will be caught and dealt with. One of the advantages of exception handling is that it allows you to concentrate on the problem youre trying to solve in one place, and then deal with the errors from that code in another place.
To see how an exception is caught, you must first understand the concept of a guarded region. This is a section of code that might produce exceptions and is followed by the code to handle those exceptions.