Balaguru Exception
Balaguru Exception
Resources
[1] Object Oriented Programming with C++ (3rd Edition)
E Balagurusamy
[2] Teach Yourself C++ (3rd Edition) H Schildt
EXCEPTIONS
Exceptions are run time anomalies or unusual
conditions that a program may encounter during
execution.
Conditions such as
Division by zero
Access to an array outside of its bounds
Running out of memory
Running out of disk space
Exception object
catch block
Invoke function
Throw exception
THROWING MECHANISM
The throw statement can have one of the following
3 forms
throw(exception)
throw exception
throw //used to re-throw a exception
catch (…)
{
// statement for processing
// all exception
}