Improving exception treatment