You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Michael Dürig <mi...@day.com> on 2010/03/01 10:32:45 UTC
Re: [jr3] Exception Handling
> == Use Error Codes ==
What about using something like a hash code (for example of the current
stack trace) as error code? These would then automatically serve as hash
tags for Google searches. That is, errors pasted into a discussion forum
would be indexed by Google. Searching for 'Error
6df8c9ef2aa1cf7b04b52939b7c1cd7e' would then practically unambiguously
lead to that post.
Michael
Re: [jr3] Exception Handling
Posted by Guo Du <mr...@gmail.com>.
On Mon, Mar 1, 2010 at 9:32 AM, Michael Dürig <mi...@day.com> wrote:
> What about using something like a hash code (for example of the current
> stack trace) as error code? These would then automatically serve as hash
A good sample to deal with error messages:
http://publib.boulder.ibm.com/infocenter/ltscnnct/v2r0/topic/com.ibm.connections.25.help/r_error_codes_news.html
For a given error message:
CLFWX0019E: PUT HTTP method is not supported for this URL.
It contain a prefix "CLFWX" tell which component is coming from, and
it end with "E" means error. (W=Warn, I= Info)
The rest of the error message are supposed to be translated to other
languages. So even for none English users, we can still tell what's
going wrong from the error code.
-Guo
Re: [jr3] Exception Handling
Posted by Michael Dürig <mi...@day.com>.
Dominique Pfister wrote:
> I wouldn't call it error code, then: every time something changes
> either in the calling code or in the code throwing the exception,
> you'll get a different hash code.
Agreed, the stack trace might be too unstable. But I still like the idea
of using something cryptic for error codes. To see what I mean try
Googling for "error 1" and "error 0x800cccff". The second query gives
much more precise results.
OTOH it needn't be the error code. We could also include it just at what
it is, a hash tag.
Michael
>
> Dominique
>
> On Mon, Mar 1, 2010 at 10:32 AM, Michael Dürig <mi...@day.com> wrote:
>>> == Use Error Codes ==
>> What about using something like a hash code (for example of the current
>> stack trace) as error code? These would then automatically serve as hash
>> tags for Google searches. That is, errors pasted into a discussion forum
>> would be indexed by Google. Searching for 'Error
>> 6df8c9ef2aa1cf7b04b52939b7c1cd7e' would then practically unambiguously lead
>> to that post.
>>
>> Michael
>>
>>
>>
Re: [jr3] Exception Handling
Posted by Dominique Pfister <do...@day.com>.
I wouldn't call it error code, then: every time something changes
either in the calling code or in the code throwing the exception,
you'll get a different hash code.
Dominique
On Mon, Mar 1, 2010 at 10:32 AM, Michael Dürig <mi...@day.com> wrote:
>> == Use Error Codes ==
>
> What about using something like a hash code (for example of the current
> stack trace) as error code? These would then automatically serve as hash
> tags for Google searches. That is, errors pasted into a discussion forum
> would be indexed by Google. Searching for 'Error
> 6df8c9ef2aa1cf7b04b52939b7c1cd7e' would then practically unambiguously lead
> to that post.
>
> Michael
>
>
>