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

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

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.
What are friend classes? What are advantages of using friend classes?
What are friend classes? - The friend function is a ‘non member function’ of a class.....
What are zombie objects in C++?
What are zombie objects in C++? - An object creation of a class is failed before executing its constructor....
Difference between Stack and Queue - C++
Difference between Stack and Queue - Stack is a Last in First out (LIFO) data structure....
Post your comment