I\'ve been updating an existing library to throw exceptions to help improve debugging by people using the library.
At first, I thought I\'d define exceptions specific to
Extending the Exceptions without adding any value like this is a complete waste of time and incurs an ongoing maintenance cost that is best avoided.
Use the standard exceptions.
This is not to say that you should never use custom exceptions, just not in the use cases you present.
Also, when creating custom exceptions, they should be related to the conditions which cause them, not the class from which they might be thrown. It is OK to relate them to a business/functional area, as error conditions which cause exceptions are likely related in this way, and it will provide useful filtering techniques.