[2005] Exception Messages
Hi all,
I am developing an application and had a question about exception messages.
My question is, should I display the exception to the user, or give them some other message? I don't know exactly what the "best practice" is for these kinds of messages.
I ask because this is an internal app, so the users will know to e-mail me a screenshot of the error box if an exception occurs.
I would just give them a message and write the actual exception to an error log (like I am doing for my web application), but the problem is that the app will be installed on individual PC's and it will be quite the inconvenience for the user to have to find the error log, open it, and send me the exception details.
Re: [2005] Exception Messages
The best practice for exceptions is to handle them and attempt to recover if possible (while making a trace to let the developers know where issues are happening).
Displaying exceptions to users is overwhelming and scares them. It would be the same as if a doctor woke you up mid surgery to let you know something is wrong and there's nothing he can do about it. The less they know, the better. Just keep good logs.
There's a multitude of ways you can have it report back to you. The simplest being automated email. There's quite a few threads on this site that has information on how to send emails with vb.net. Your other option is a database. Only downfall there is if the exception was thrown because communication was lost, but if you have MSMQ set up - it shouldn't be a problem. When connectivity is restored, it'll send.
Re: [2005] Exception Messages
I agree that displaying the actual error message to users is probably overwhelming to them.
But this is an internal app. The users that will be using the app won't be scared, they'll just ring my phone or send me an e-mail with the exception (which is what happens with most of our Windows apps).
And it'll probably be a handful of users anyway, so I really don't want to go through the trouble of adding anything else to it (especially since it is supposed to roll out next week).
I think I'll leave it as is and if the users complain about the messages, I'll change it.
Re: [2005] Exception Messages
"My question is, should I display the exception to the user, or give them some other message? I don't know exactly what the "best practice" is for these kinds of messages."
IMHO the best practice is to rarely have exceptions if at all. What exception are you having that you are contemplating showing to the user?
Re: [2005] Exception Messages
I would make sure that the message shown to the user makes it clear that the entire problem is their fault.
That's not entirely facetious. For internal programs, a bit of levity makes those error messages less daunting. However, if you want a chance to solve the problem, you have to at least make sure that there is sufficient information in the message that you have some chance of tracking it down.
Re: [2005] Exception Messages
Depends on the user. If the users have some degree of technical skills or knowledge of the system's overall design, then showing the exception would be alright. Less knowledge, a more general exception so that they know something has happened and that they should be reporting or complaining about it (not that they need encouragement to complain). In either case, log it in a place where the error is easily accessible by any developer.
Re: [2005] Exception Messages
Quote:
Originally Posted by mendhak
Depends on the user. If the users have some degree of technical skills or knowledge of the system's overall design, then showing the exception would be alright
Whell you can display a custom message and store the error to an error log. Depending on the appliocation, if it is for a buisness and the computer will always have internet connection you can email the error log to your email address every time theres an error, and then reset the error log on the users PC.
If you do choose this and you don't know how to set-up the program to email you with an attachment, well that's a different topic.
----------OR ------------------
You can save the error log on a folder called "Programs Name / anything" in the users 'My Documents' and in the error message above the exception tell the user to get the error to notify you about it through My Documents. Well the only reason i am suggesting this is because of what you said before a long the lines you were thinking.
**Though as you said defintly not a great idea.
Quote:
Originally Posted by Blakk_Majik
I would just give them a message and write the actual exception to an error log (like I am doing for my web application), but the problem is that the app will be installed on individual PC's and it will be quite the inconvenience for the user to have to find the error log, open it, and send me the exception details.