beyondgrader.com Logo
DemoBrowseAboutTeamLogin

Catching Exceptions

Geoffrey Challen // 2020.11.0

Create a method named catcher that takes, as a single parameter, a Faulter that has a fault method. You should call that fault method. If it generates no exception, you should return 0. If it generates a null pointer exception, you should return 1. If it throws an illegal argument exception, you should return 2. If it creates an illegal state exception, you should return 3. If it generates an array index out of bounds exception, you should return 4.