update function_benchmark to test exception handling