List of Messages...
Hi All,
Is it possible to get a list of all messages that an Exception will give when called getMessage() method?
I am working in a small application and i want to give the users my own messages when exception occurs.
For Example, When exp.getMessage() returns "Null Pointer Exception", i want to display my own message instead of this.
Any ideas?
Thanks,
Venkat
Thank you for the reply.
I was not clear with my question. Sorry for that.
I want a list of all the messages that the getMessage() method will return.
For example "Null Pointer Exception", "IndexArrayOutofBoundException", etc...
Am I clear atleast now?
Thanks
Venkat
Just a thought: your users should not be getting messages like "Null Pointer Exception" - or some translation thereof. (At any rate, it annoys me to get messages like this from software.)
Rather your program should be responding to events (including exceptions) that are significant to it and to its users. It might be a good idea for error messages to reflect this and be couched in terms that the user can appreciate. In this case there will be no simple 1-1 correspondence between Exceptions and the error messages that might (or might not) result. Even if you could determine what all those messages might be (which you can't for the reasons Ceci gave)