Coupon Accepted Successfully!


Principles Of Exception Handling

Similar to errors, exceptions are also of two types. They are as follows:

a. Synchronous exceptions

b. Asynchronous exceptions

C++ has a well-organized, object-oriented method to control run-time errors that occur in the program. The goal of exception handling is to create a routine that detects and sends an exceptional condition in order to execute suitable actions. The routine needs to carry out the following responsibilities:

1. Detect the problem

2. Warn that an error has been detected

3. Accept the error message

4. Perform accurate actions without troubling the user

An exception is an object. It is sent from the part of the program where an error occurs to the part of the program that is going to control the error. An exception provides an explicit pathway that contains errors to the code which controls these errors.

Test Your Skills Now!
Take a Quiz now
Reviewer Name