Which is a better approach to exception handling and why?:
(1) Defining a single exception for the whole application which takes a string message and displays it. Use this exception everywhere with a specific message appropriate to the scenario.
I have no idea why this is not appropriate.
(2) Defining a new exception class for each different case in the application.
I feel this is not appropriate because there are cases where the exception is at just one place in the application. e.g. amount entered is -ve Is it ok to create a whole new exception class just for a single case in the app ?