Handle more than one type of exception in the main method