How technical should error messages be ?

When I opened pidgin today, I got an error message regarding my buddy list file. Since the program couldn’t use the current list, it has loaded an old file with about half my buddies.

Pidgin blist.xml error message

The problem with this error message, is that it doesn’t give you any clue to the root cause of the error. This of course makes it harder for me to fix the problem and get on with using the program.

I’ve opened the file with vi, and it generally seemed OK with the all the major starting/ending XML tags. So I opened it with Firefox, to see if it parses the XML, and only then I could see the real problem:

XML Parsing Error: reference to invalid character number
Location: file:///home/kaplan/.purple/blist.xml~
Line Number 416, Column 47:

Looks like one of my buddies has a weird Unicode character in his nickname, which wasn’t correctly escaped by pidgin when it had been written to the XML file. Removing the problematic character fixed the problem and pidgin started with my full buddy list.

For me, as a technical person, seeing a problem with a XML file, usually raises the flag regarding parsing errors. I don’t expect common users to have this information. But giving a more informative error message could help such a user to get help and directions to the solution in forums or IRC.

So to all the programmers reading this, I’d like to ask you to try and give a clue to the problem in your error messages. It can simplify usres’ life…

2 Comments

Filed under Free software applications

2 responses to “How technical should error messages be ?

  1. /me

    … and if you are using XML, use a proper XML writer library, that should take care of character escaping for you.
    If’ve seen so many applications write “XML” using fprintf, that I wouldn’t be suprised if pidgin does the same thing.
    Please, if you’re trying to use XML, use a library for it. They know about handling corner cases.

  2. sfa

    I have a similar problem, but it comes from one of the group names from my Yahoo account. When I remove the offending characters from blist.xml manually, pidgin starts with no errors only for the next time. After that first time, the error comes back when I start pidgin again. I think it re-writes the file before exiting with the problematic chars in it.
    Any suggestions?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s