Correct exception handling.