G
Gary Wessle
Hi
in the example code below, if function A or B throw, and I deal with
it by setting flag to 0, does the code re-execute from the start of
the try line or it resumes from the function that threw and the flag
has no effect?
thanks
for(;
{
try
{
if( flag == 0 )
{
x = some_funciton_output( 0 );
}
else if( flag == 1 || flag == -1 ) // reverse
{
x = some_funciton_output( 3 );
}
if( x == 0 )
{
function_A_that_throws();
}
else
{
function_B_that_throws();
}
break;
}
catch (const someException& sde)
{
flag = 0; // could not reverse, then close in the market
}
}
}
in the example code below, if function A or B throw, and I deal with
it by setting flag to 0, does the code re-execute from the start of
the try line or it resumes from the function that threw and the flag
has no effect?
thanks
for(;
{
try
{
if( flag == 0 )
{
x = some_funciton_output( 0 );
}
else if( flag == 1 || flag == -1 ) // reverse
{
x = some_funciton_output( 3 );
}
if( x == 0 )
{
function_A_that_throws();
}
else
{
function_B_that_throws();
}
break;
}
catch (const someException& sde)
{
flag = 0; // could not reverse, then close in the market
}
}
}