harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dalibor Topic <robi...@kaffe.org>
Subject Re: should strings in exceptions match the reference implementation?
Date Wed, 19 Apr 2006 02:34:47 GMT
Geir Magnusson Jr <geir <at> pobox.com> writes:

> Good question though - what does GNU Classpath do?

Throw better exception messages, of course ;)

I don't see a specific rule regarding this in the GNU Classpath 
hackers guide [1], but as long as a specific exception message 
(format) is not mandated by the spec, we (should here, and do in 
GNU Classpath in general) take the liberty to provide (more) 
useful error messages. 

>From my experience with the RI, the exception messages tend to 
be of less then desirable utility to fix the problems that 
cause the exceptions [2], so copying them verbatim does not 
apper to be desireable to me.

Moreover, the 'search engine optimization' effect of copying 
the same error messages would seem to be easily fixeable by 
providing better error messages in ant, if I understood 
Mark's example correctly ...

So, to cut my post short, I'm with Elena on this: provide a 
useful exception message that helps the user figure out what 
the problem is.

dalibor topic

[1] http://www.gnu.org/software/classpath/docs/hacking.html
[2] http://forums.oracle.com/forums/thread.jspa?threadID=377599&tstart=0
 for a classic example:

java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver

Obviously, it would be a bit more helpful to know where the system went looking
for that class, for example. So Kaffe would give you:

java.lang.ClassNotFoundException: NoSuchClass not found in
java.lang.ClassLoader$1{urls=[file:/home/topic/projects/kaffe/./], parent=null}

which is a bit more helpful.

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

View raw message