I would like to have a single location where exception messages are stored (these are not user facing). I also have some exceptions which can have different error messages and codes. These codes are intended only for documentation and communication purposes. However, having all the error messages in one place is very valuable to refer to errors and provide suggested fixes for the operations people
I am considering these:
- Resourcebundle for all exception messages
- global enum with each enum containing a message and code
- enum inside every Exception class, with each with message and code that exception can have.
Which is the best option ?