Havoc PenningtonHavoc Pennington logError Codes- July 4, 2008 API design rule: error codes alone are not a reasonable way to report errors. You need a mechanism that can return a helpful string. Like exceptions in most languages, or GError in C. You can return an error code also, if appropriate. A helpful string does NOT mean some generic string form of the error code, as with strerror(). Here is an example from XPCOM (have to pick on someone, and this is what I tripped on today): Error: Exception... "'Component does not have requested...http://log.ometer.com/2008-07.html#4 |