harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paulex Yang <paulex.y...@gmail.com>
Subject Re: should strings in exceptions match the reference implementation?
Date Tue, 18 Apr 2006 10:52:47 GMT
Mark Hindess wrote:
> I thought my first message in this thread made this clear but obviously not.
>
> I'm not suggesting that code would care if the exception messages are
> identical.  I was suggesting that it is probably now quite common for
> users to type error messages straight in to google.  Therefore having
> messages match those of existing implementations would help our users
> find the cause of an exception.
>   
Well, I did miss this information I think, sorry for that.

Please correct me if my experience is wrong, in C/C++ world, error 
message is very important, it is often the only information to judge 
what's going on about the mistake, because the habits of c/c++ program 
is to define list of error codes and error messages, print the message 
and exit when some error codes returned. But Java application is another 
story, error message is still important but not so significant, because 
Java has exception hierarchy, and exception type itself is 
self-descriptive in many cases(I know, I know, naughty boys like 
SQLException are not unusual, but that's mostly because it wraps error 
message from DB server). Further we have JavaDoc to describe the 
exceptional case and relative exception, even for runtime exception if 
they are not so typical and self-descriptive. So I myself have lots of 
experience to search error messages for system call/compiler/db2 even 
JVM, but IMHO I have little experience to search error message for Java 
class library.

However, I have no objection that there are exceptional case, where the 
message is very important and should at least has similar keywords with 
RI's, SQLException is a good example, but it is enough to be clear and 
concise for the majority of exception messages.

Comments?
> Regards,
>  Mark.
>
> On 4/18/06, Chris Gray <chris.gray@kiffer.be> wrote:
>   
>> On Tuesday 18 April 2006 09:37, Mark Hindess wrote:
>>     
>>> Are you saying that Classpath does match strings in exceptions?
>>>       
>> No. Ah, I see: the "do" in Geir's question stood for "what is Classpath's
>> policy wrt to exception messages matching those of the RI?". Then I don't
>> speak authoritatively, but I've never noticed Classpath going out of its way
>> to be compatible at this level. But then I would never write code which
>> depended on the precise contents of an exception message ...
>>
>> Sorry for the confusion,
>>
>> Chris
>>
>> --
>> Chris Gray        /k/ Embedded Java Solutions      BE0503765045
>> Embedded & Mobile Java, OSGi    http://www.k-embedded-java.com/
>> chris.gray@kiffer.be                             +32 3 216 0369
>>
>>
>> ---------------------------------------------------------------------
>> Terms of use : http://incubator.apache.org/harmony/mailing.html
>> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
>> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>>
>>
>>     
>
>
> --
> Mark Hindess <mark.hindess@googlemail.com>
> IBM Java Technology Centre, UK.
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>
>   


-- 
Paulex Yang
China Software Development Lab
IBM



---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message