Results 1 to 7 of 7

Thread: [2005] Exception Messages

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Dec 2006
    Location
    Between Try & Catch
    Posts
    249

    [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.
    If my post helped you, please rate it!

    Languages: VB/ASP.NET 2005, C# 2008,VB6
    Databases: Oracle (knowledge not currently in use), DB2

    FROM Customers
    WHERE We_Know_What_We_Want <> DB.Null
    SELECT *
    0 rows returned

  2. #2
    Hyperactive Member syntaxeater's Avatar
    Join Date
    Dec 2006
    Location
    Des Moines, IA
    Posts
    460

    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.
    Last edited by syntaxeater; Jul 3rd, 2008 at 01:37 PM.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Dec 2006
    Location
    Between Try & Catch
    Posts
    249

    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.
    If my post helped you, please rate it!

    Languages: VB/ASP.NET 2005, C# 2008,VB6
    Databases: Oracle (knowledge not currently in use), DB2

    FROM Customers
    WHERE We_Know_What_We_Want <> DB.Null
    SELECT *
    0 rows returned

  4. #4
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    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?
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  5. #5
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    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.
    My usual boring signature: Nothing

  6. #6
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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.

  7. #7
    Frenzied Member
    Join Date
    Jan 2008
    Posts
    1,754

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width