Page 1 of 1

Exception handling and EInvalidOp:

Posted: Mon Jul 08, 2002 11:00 pm
by Philip James
Exception handling and EInvalidOp:

What is the correct syntax for exception handling of EInValidOp?  The catch formulation I am using below does not work.

//////////////////////////////
try
{
     offending statement that potentially throws a floating point error
}
catch (EInvalidOp &exception)
{
     OffendingVar = 0;      // and not the -1.#QNAN I was getting.
     Memo1->Lines->Add("An Exception Occured and variable was fixed:");
}