Exception-Handling Advantages in C++
Exception handling enables the caller of the function to process the exception thrown from a function. Listing 16.3 demonstrates how an exception is created, thrown, caught, and handled. You may wonder about the benefits. To see them, we rewrite Listing 16.3 to compute a quotient using a function as shown in Listing 16.4. Listing 16.4 [ [ ...]