Origin Version: 7.5Pro-SR6
Operating System: Win-XP-PRo-SR2
Thre following code snippet illustrates an oddity
bool MyFunc(int i)
{
try
{
if(foo(i)==true)
{
SetDataDisplayText("true");
return (true);
}
return (false);
}
catch (int ierr)
{
if(ierr==1)
{
SetDataDisplayText("false");
return (false);
}
SetDataDisplayText("Unknown");
return (false);
}
}
bool foo(int i)
{
if(i<=0) throw (1);
return (true);
}
The command "Myfunc(0)" behaves as intended ... Prints "false"
However when "MyFunc(1)" is called "return (true)" does NOT terminate the program and code in the Catch block is executed and "Unknown " is printed ...
Does anyone have any ideas ??