You could try the "update the return value as you go" scheme:



ReturnType foo()
{
ReturnType return_val = a;
try{
return_val = b;
if...