Correct exception handling