This really isn't an important question. I just wanted to know which method is more popular and whether there's some sort of a de facto standard.
This,
function foobar
{
int retVal = 0;
try
{
retVal+=100;
}
catch
{
//error handling code
}
return retVal;
}
Or this?
function foobar
{
try
{
return 100;
}
catch
{
//error handling code
}
return 0;
}