Better exception treatment