Avoid temprary variable assignment by returning value directly from try
block.