Raising and logging exceptions in recipes