Refactor for clarity.
Solution for Étude 9-1: try and catch