Hello, I’m trying to measure the time it takes to execute a function although I want to log the time it took even if the function throws any exception. I came up with this approach but seems ugly to me. What you guys think? Is there any other approach?