The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,533 other followers

Non-English error messages…

Posted by jpluimers on 2010/03/17

Sometimes you wish there was some universal translation table to get the English error messages.

Just got this at a client:

Project Foo.exe raised exception class EOleException with message ‘De bewerking moet worden uitgevoerd op een query die kan worden bijgewerkt‘.

The English translation of the error message is “Operation must use an updateable query” (which is also wrong: the query is indeed updateable).
But not knowing that English translation beforehand, how do you find out the cause?

If all error messages contained some kind of ID somewhere in the text, it would be much much easier to find out any translation.
But they don’t, so an English error message is likely the most convenient way to find any cause.

It is one of the reasons I like English systems: the chance of finding usefull information is so much higher than on non-English systems.
In fact when speaking at BASTA! 2009, I met long time SQL Server guru Maciej Pilecki, and he stated that all server installations should be in English to enhance your chance of finding useful information when things go wrong. He explicitly ruled out Polish, German, French, Spanish, Chinese and a whole other bunch of languages, and I totally agree.

In addition, somehow, error messages have a tendency to describe the effect of the error, but not describe the cause of the error.
This particular error message (both in Dutch and in English) is no exception: in this particular case it is totally wrong about the cause.

The query itself is updatable.
But the underlying DB (which is Access) is not, because the underlying MDB file it is readonly.

The query itself is this a DML statement (and has all the required parameters filled): it is an update and therefore updateable.

UPDATE Entiteit
SET
   ExternNummer = :ExternNummer_Changed,
   ID_GebruikerInvoer = :ID_GebruikerInvoer_Changed,
   TimeStampInvoer = :TimeStampInvoer_Changed,
   ID_GebruikerLaatsteWijziging = :ID_GebruikerLaatsteWijziging_Changed,
   TimeStampLaatsteWijziging = :TimeStampLaatsteWijziging_Changed
WHERE ID_Entiteit = :ID_Entiteit

The fun is, that the Google search query English “De bewerking moet worden uitgevoerd op een query die kan worden bijgewerkt” gets the correct answer (3 answers, the 3rd answer is the right one).

The anser points to Microsoft KB Q175168/ which:

  1. contains the English error message.
  2. indicates the lack of write permission to the MDB file.

So, finding about error messages on the internet is all about phrasing your search queries carefully.
Which takes time and experience to learn.
Hopefully this posts helps you a bit in that learning proces.

One more error down, hopefully few to go.

–jeroen

2 Responses to “Non-English error messages…”

  1. Dag Hovden said

    Couldn’t agree more. Searching for the Dutch text is hopeless and it’s really hard (impossible) to know what the exact wording in English is. In my own programs, I translate the informative bit, e.g. “Couldn’t save to database” but I keep the technical error message in English. All in all, it’s pretty stupid to translate it anyway because most error messages tell the average user absolutely nothing. For instance, in your example above, ‘een query die kan worden bijgewerkt”, which user would be assisted by that and led to positive action?

    So, good article!

  2. There was a lengthy discussion on the E. forum that touches your subject:
    https://forums.embarcadero.com/message.jspa?messageID=90948

    The main problem came from the fact that DelphiSVN does not provide the svn error value in the exception text. In this way I only get a text that I have to interpret. Let’s say however, as a programmer I encounter an exception while testing and thus I have to add an additional error handler (I do not catch exceptions or handle errors that I do not know of. So I do not use empty try/except E: exception statements in releases.). Say the exception is always ESvnError but it also provides a property ErrorCode. If the exception text showed the error value, I could simply find the error constant (I mean its name in the svn headers) and add it into the exception handling:

    try
      ...
    except
      on e : ESvnError do
      begin
        case E.ErrorCode of
          SVN_ERROR_BLA : DoHelp;
        else
          raise; // ???
        end;
      end;
    end;
    

    Unfortunately, the message does not contain an error number and thus I have to add it manually to the text. This means that I have to do it for every SVN call that may create an exception.

    try
      ...
    except
      on e : ESvnError do
      begin
        case E.ErrorCode of
          SVN_ERROR_BLA : DoHelp;
        else
        begin
          MessageDlg(Format('%s (%d)',[E.Message, E.ErrorCode]));
          raise; // ???
        end;
      end;
    end;
    

    My opinion was (and still is) that an error message must be delivered with its error value. As you can read, many programmers do not share this thought.

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s

 
%d bloggers like this: