Exception handling and EInvalidOp:

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Philip James

Exception handling and EInvalidOp:

Post 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:");
}
Post Reply