Friday, February 5, 2010

What are the advantages of “throw.....catch” in C++?

The following are the advantages of throw and catch in c++.
- Code isolation: All code that is to be handled when an exception raises is placed in the catch block, which is not part of the original code.
- The logic is pertaining to the type of the error, so that the developer can concentrate only on that exception.
- Developer can be selective about trapping various exceptions

0 Comments: