I know from wikipedia for example that exception handling is used in an application to custom handle certain errors in a fail-safe manner. However, I'm not sure why in those cases in general the developer would want the user to experience the error to be reset in a fail-safe manner. The following is a pseudocode of what I'm doing (but I'm not sure what's the biggest purpose of the exception in this case).
while(not exitting the program)
{
try
{
Perform(); // perform custom calculation by calling
}
catch(int e)
{
sort out what e stands for
reset the variables of the object
}
catch(...)
{
print message
reset the variables of the object
}
}
It would be great to hear some comments. Thanks in advance.