Without retries, this function is pretty much unnecessary, since the code to handle a special return value is not really clearer or more compact than the code to handle exceptions.