On 11/27/2011 8:34 AM, Rich Bowen wrote:
At Apachecon several of us were discussing how error messages could be made 
more helpful without making them paragraphs. Two suggestions were made - adding 
a URL to the message or adding a number/code to each error that would then be 
looked up for more information.

Any thoughts on 1) the wisdom of this and 2) the method of assigning codes?

Keep these numeric and it will assist us in later internationalizing error
log messages.  I was initially thinking in terms of using hashed strings
into mapping indexes, but such numeric codes would be valuable.

Ideally we could assign these numbers into the appropriate apr_errno range.

From the docs...
/**
 * APR_OS_START_USERERR are reserved for applications that use APR that
 *     layer their own error codes along with APR's.  Note that the
 *     error immediately following this one is set ten times farther
 *     away than usual, so that users of apr have a lot of room in
 *     which to declare custom error codes.
 *
 * In general applications should try and create unique error codes. To try
 * and assist in finding suitable ranges of numbers to use, the following
 * ranges are known to be used by the listed applications. If your
 * application defines error codes please advise the range of numbers it
 * uses to d...@apr.apache.org for inclusion in this list.
 *
 * Ranges shown are in relation to APR_OS_START_USERERR
 *
 * Subversion - Defined ranges, of less than 100, at intervals of 5000
 *              starting at an offset of 5000, e.g.
 *               +5000 to 5100,  +10000 to 10100
 */

APR_OS_START_USERERR starts at 70000 through 5699999.  As the SVN hints
suggest, we would probably want to block out 70000-799999 for core errs,
then 80000- in small blocks for individual modules.

Reply via email to