I'm trying to catch a 'specific' exception (FormatException^ or OverflowException^) and then re throw it and catch it in the 'general' exception (Exception^) catch block.
When run, I give it a format exception through input. I then get this error in a dialog box: "An unhandled exception of type 'System.FormatException' occurred in FutureValue.exe Additional information: Input string was not in a correct format." When I click 'break' it takes me to line # 232.
Here is the partial code:
try
{
...
}
catch(FormatException^ ex)
{
MessageBox::Show("FormatException Occured. Message: " + ex->Message);
throw;
}
***line# 232*** catch(OverflowException^ ex)
{
MessageBox::Show("Overflow Occured. Message: " + ex->Message);
throw;
}
catch(Exception^ ex)
{
MessageBox::Show("TESTING");
}