Error messages

Frequently we are presented with error message pop-ups with messages like "Unable to open file". Error messages are popped up when something has gone wrong. If SW cannot convey to the user what went wrong and what he can try to fix the problem, it might as well not show the error message at all.

So all errors messages must have three components

  • Notification
  • Explanation
  • Solution

A good example for a Team Build scenario would be

Unable to connect to the build machine "BuildServer01"
Make sure that the machine is connected to the network and the TeamBuild Service is running on it.

So all error messages that have one sentence in them are most probably not as helpful as it states what happened and not what can be done to rectify it.

Another important thing to note is that the user is never to be blamed for any error. If the action he did was dumb then we are at fault that we did not restrict him from committing a dumb action.

Comments (2)
  1. This is absolutely right. I was doing same mistake. Most of the time just display error message which might not be user friendly.

    So possible solution for it will be creating ExceptionManagement class which take care of all these things.It will be derive from System.Exception will extend it with Explanation and Solution Property.

  2. James Talbut says:

    As a user I don’t care for the "solution" presented by software – they are invariably wrong.
    <br>Error messages should concentrate on providing as much information as possible to the user (and the to the sysadmin) about what went wrong and why.
    <br>There is, of course, the argument that users shouldn’t be presented with too much information.
    <br>This is perfectly reasonable, and why you should put even more details in the EventLog – even for user-oriented applications.
    <br>The example given above is, IMHO a good example of an unhelpful error message.
    <br>The first line is useful, the second starts off by being insulting (of course the machine is on the network) and then goes on to suggest you do something without providing any information about how to do it.
    <br>When in fact the problem could be almost anything and the author of the software has no hope of suggesting every possible solution.
    <br>If you want to be helpful (and this is a lot more work) start carrrying out other tests to try to ascertain what it is that isn’t working (is it that you can’t communicate with BuildServer01 or is it that BuildServer01 is not running appropriate software – do the tests that a competent sysadmin would have to do to get your software working (ping, telnet the port, try to login, etc.).

Comments are closed.

Skip to main content