R
Rahul
Hi Everyone,
I have the following code,
int main()
{
bool continue1 = true;
while(continue1)
{
try
{
printf("executed\n");
throw 5;
continue1 = false;
}
catch(int)
{
printf("exception caught, and about to retry also\n");
continue1 = true;
}
}
return(0);
}
So it turns out to be a recursive throw and handling of the integer
exception. the int 5 is allocated in the stack and therefore i assume
that it is passed to the catch handler by value as a function call...
if that is the case, is it similar to recursive function call and
would cause a stack overflow?
Thanks in advance!!!
I have the following code,
int main()
{
bool continue1 = true;
while(continue1)
{
try
{
printf("executed\n");
throw 5;
continue1 = false;
}
catch(int)
{
printf("exception caught, and about to retry also\n");
continue1 = true;
}
}
return(0);
}
So it turns out to be a recursive throw and handling of the integer
exception. the int 5 is allocated in the stack and therefore i assume
that it is passed to the catch handler by value as a function call...
if that is the case, is it similar to recursive function call and
would cause a stack overflow?
Thanks in advance!!!