Hello guru!
I have a question: try/catch handles only throw command or all exceptions?
I write this code:
int main()
{
printf("start\n");
try
{
int a = 0;
int b = 0 / a;
}
catch(...)
{
printf("error\n");
}
printf("end\n");
return(0);
}
Then, my program crash at line with "b=0/a".
With Ubuntu and U++ (debug mode and release mode)
and also with Windows Xp and Microsoft Visual Studio!!!
(Visual studio show a pop-up, to inform about exception).
WHY???
But, if I insert a "throw", then it jump correctly to catch(...).
I must verify all possible errors and insert my "throw"??? I don't belive!!!
Maybe I must active some flag?