harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jimmy, Jing Lv" <firep...@gmail.com>
Subject Re: [classlib]strings externalization
Date Fri, 28 Jul 2006 05:52:49 GMT
Andrew Zhang wrote:
> On 7/27/06, Tim Ellison <t.p.ellison@gmail.com> wrote:
>>
>> Ilya Okomin wrote:
>> > On 7/27/06, Tim Ellison <t.p.ellison@gmail.com> wrote:
>> >> The other reason we will need some manual intervention is that 
>> there is
>> >> plenty of code that throws exceptions without any message describing
>> the
>> >> problem, and of course the tooling won't help there.
>> >
>> > Tim, do you mean, that Exceptions without any messages supposed to be
>> > initialized with some corresponding message describing the problem? I
>> > thought only already existing in modules messages are to be considered.
>> > Just want to dispel doubts.
>>
>> I see plenty of code going in to svn that simply throws a new
>> IllegalArgumentException() or whatever.  It would be good if they had an
>> externalized message to explain what the problem was -- i.e. throw new
>> IllegalArgumentException("Parameter foobar should be less than 42") etc.
> 
> 
> Agree. Meaningful message helps. But all exceptions defined in java.nio and
> java.nio.channels only have a constructor without any parameter. :)
> Seems sun is becoming lazy on this issue. :)
> 

:) Rather call them "clever" than "lazy" in my mind, as an 
IllegalArgumentException can enough detail for user to know what is 
wrong (and javadoc also offer some information). Only some exception, 
like IOException, may need more detail for its cause.

After all, now Harmony can use RI's error message, so it is no longer 
necessary to rack our brains to write error message. :)

> You might consider this a separate task to that of externalizing the
>> existing messages, but depending on how 'manual' the externalization
>> scan is for each module it may be worth doing both simultaneously.
>>
>> >> So once we have the basic framework in place for the message 
>> handling I
>> >> think it will require a large manual effort to get all the strings 
>> that
>> >> we want externalized properly.  Luckily it is not technically complex
>> >> work and it is a task that we can easily do in parallel across the
>> >> modules.
>> >
>> > Yep, I've chosen the same way to do.
>>
>>
>> Cool -- did you get anywhere with the message handling framework
>> 'template' code?
>>
>> Regards,
>> Tim
>>
>> ---------------------------------------------------------------------
>> 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
>>
>>
> 
> 


-- 

Best Regards!

Jimmy, Jing Lv
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