Hi I am working on a project. I am overriding a method in about 100 classes in the project, and I am using a map to populate some keys and values and returning the map. Now the map.put() method throws 4 exceptions: Null, UnsupportedOperation, IllegalArgument and ClassCast Exceptions. So should I handle all of them or not. Obviously I should, is it all?.
Then the question is should I handle these in every method overridden(100 classes) or just add throws keyword in the method and handle where I am calling these methods?
What is better practice? Its a very crucial project and no exception shouldn't go unhandled, otherwise it may crash many other things. Tell me viewing the real life scenaiors.