You should have inside `try` only the code that might raise an exception.