Execute code without writting rescue in methods with before and after hooks.