move return inside try block

if the decorated function raised an exception, result would never
be set.