La Vita è Bella


What about an Error Code Management System?

UPDATED: about the name, according to wine (Wine Is Not an Emulator), I think we can call it sine (Sine Is Not an Error), or even cosine (COSine Is Not an Error). In fact, in Chinese, "cosine" is pronounced as "yuxian", which is very similar to my name "yuxuan" :P

Microsoft had maintained a huge KB of error codes, so if you met some error, you can always look it up in the MSDN by its error code.

For any project, it's important to keep your error codes unambiguous. If -1 means "no such file" in function A, but means "MySQL connection timeout" in function B, that's nightmare.

So what about a Error Code Management System? It maintain the whole error code database, automatically generate the error code header, and automatically generate the document.

It's supposed to be a simple PHP script, use MySQL as database back end, and support cvs/svn commit.

The work process is supposed to be like this:

  1. A programmer need to define a new error code.
  2. He opens the System, input number, macro name, description, etc.
  3. The System checks if the number is already taken. If not, accept the error code.
  4. Add it into database.
  5. Generate new header file, commit it.
  6. Generate the document. Or it may be another system, just read descriptions from database.

As usual, a project name is needed. :P

18:44:28 by fishy - Permanent Link

May the Force be with you. RAmen