Possible Duplicate:
Difference between try-catch syntax for function
There is this code:
int fun() try
{
throw 1;
return 2;
}
catch(int){
return 1;
}
int fun2(){
try{
throw 1;
return 2;
}
catch(int){
return 1;
}
}
What is purpose of keeping whole function body in try block and are these two definitions of functions different according to try..catch block?