floating point overflow / c++ exception notification

2003-08-06 10:57:54 AM
I have a program that frequently causes floating point overflows in a
specific section of code. I have this section surrounded with a try/catch
such that the catch is empty because I just want to ignore overflows here.
Since I don't care whether this particular section of code causes
exceptions, I would also like to turn off the message dialog that
automatically interrupts my program.
I could do this by going into the de{*word*81} options and turning off the "stop
on c++ exceptions" or just add floating point exceptions to the ignore list.
However, I don't want to stop on exceptions (floating point or otherwise)
that happen elsewhere in my program.
Is there a way I can stop on exceptions only when there isn't a try/catch
for the code that causes it? Or can I put something in my catch to turn off
the message dialog for that specific exception?
Also, if a floating point overflow occurs, what happens to the contents of
the variable that is being assigned? Does it get the lower portion of the
overflow value, or is it left unaffected? In order to achieve the latter,
should I copy the variable before trying the math operation, and then copy
it back in the catch?