And if at any point you realize you have custom exceptions classes defined, but not used, remove them and replace the thrown exceptions with standard runtime errors, with a proper message.
- They add code and complexity
- Coming up with the right exceptions to detect and when and how to throw them is often not an easy task, when designing bottom-up.
- You often don't need to distinguish between types of exceptions. You just need to know that one happened. If you need details for retrospective, simply write a nice human-readable message.
- If you ever really need them, adding them is trivial. When it's your application, it's your code, and you should be able to do whatever you want with it, as long as the application stays correct, especially if it makes it better.
- A vector of string messages (const char* in C++ to avoid constructors which may throw).
- A map between a string description and any standard type (int, double, char, bool, etc), to describe state.