Greedyh4mster
Member
- Joined
- Aug 12, 2010
- Messages
- 6
- Programming Experience
- Beginner
Hiya!
I am wondering where should I store my error messages. These messages are the simplified version meant for the users. I am thinking like centralizing a specific location to store all the custom messages so that it will be easier to reference in the future. The location should also provide a key for each stored message.
For instance, I can think of using the me.settings to store all the messages. But I am wondering whether is it the best place? What is the best practice for such action?
Update:
The more accurate intention of what I am trying to say in the above is; For example:
Right now, I have the above messages embed inside the form itself. What I need will be similar to:
Something like a place or a variable collections with keys, to store all the messages that are in the form. Based on the reply below, I am thinking of storing every messages with the key into a file that when the form is loading; The form will parse the file and stored them into a global variable as hashtable. But would that be the best practice?
I am wondering where should I store my error messages. These messages are the simplified version meant for the users. I am thinking like centralizing a specific location to store all the custom messages so that it will be easier to reference in the future. The location should also provide a key for each stored message.
For instance, I can think of using the me.settings to store all the messages. But I am wondering whether is it the best place? What is the best practice for such action?
Update:
The more accurate intention of what I am trying to say in the above is; For example:
VB.NET:
Msgbox "You have encountered an error!"
Msgbox "Invalid login details!"
Right now, I have the above messages embed inside the form itself. What I need will be similar to:
VB.NET:
Msgbox errorMessage("generic")
Msgbox errorMessage("login_invalid")
Something like a place or a variable collections with keys, to store all the messages that are in the form. Based on the reply below, I am thinking of storing every messages with the key into a file that when the form is loading; The form will parse the file and stored them into a global variable as hashtable. But would that be the best practice?
Last edited: