views:

152

answers:

3

Does anyone know about an opensource list of most common error messages?

My motivation for this question, although I am adept at writing code, English is not my mother tongue.

And, such a list (somewhat, like all those free icons on the net) will shorten the last stages of my development, And good (and fun) error messages are part of a good UI, I think.

One more motivation, I might get some ideas as to things I ought to check and forgot about.

Common scenarios:

  • No authorization
  • More Info
  • Missing details
  • Missmatch user/pass
+1  A: 

In my experience there are only two kinds of error messages: those specific to the application you're developing and those generated by an API your application depends on.

The first type you will almost always need to write yourself. The second type depends on whether you want to show it to the user. Some are worded simply enough you can just pass it along to the user but in most cases the error messages produced by an API are intended for developers and would only confuse an end user.

For instance most operating systems have a "File not found" error message or something similar. Assuming the file you attempting to open was chosen by the user it makes sense to pass this error from the OS directly to the user. While a "Divide by zero" error would not help the user unless you application performs calculations directly entered by the user. For most circumstances this error would mean a programming error.

For application specific errors. The error message is only useful within the context of where it occurred. This is why you won't find a collection of generic error messages. Generic error messages usually don't give the user enough information to know how to respond.

codeelegance
A: 

Generic error messages are often not very useful, because they do not 1) suggest the user how to fix things, 2) help the developer to fix bugs. So, if you want to write good error messages, decide do you write them for the user, or for the developer, and make them as much specific as you can.

“Oops, error! [Cancel] [OK]” is useless. “Data integrity test in file.c line 33 failed. Using backup version. Please report this error to developer” is better.

jetxee
A: 

I do not know of anything that is exactly like what you ask for; a repository of generic error messages. If you need error messages for system errors, you should look at errno.h; each of those errors has a brief description (check, for instance, the specification for errno.h, or perhaps the Linux version).

Another option would be to look at translation projects for existing open source software. For instance, check out the Translation Product's .pot files or the Ubuntu translation project; this will give you a lot of error messages and other strings to choose examples from. Another advantage is that you may be able to check out the translations into your native language to use as a sort of Rosetta stone, if you ever need clarification about something (though you appear to speak and write English well enough to post here, so I'm not sure if you need that).

Brian Campbell