Changing exception catching method