Program runs but not showing exception messages