harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Liang <richard.lian...@gmail.com>
Subject Re: [general] Sun's permission to use exception messages and toString() formats
Date Tue, 08 Aug 2006 05:54:10 GMT


Alexey Varlamov wrote:
> 2006/8/7, Mikhail Loenko <mloenko@gmail.com>:
>> 2006/8/7, Geir Magnusson Jr <geir@pobox.com>:
>> >
>> >
>> > Mikhail Loenko wrote:
>> > > Does it mean that we are revisiting our agreement on "more 
>> helpful error
>> > > messages"? [1,2]
>> >
>> > They are orthogonal.  I think that Mark was right on that our message
>> > all over should be helpful, but then when we are throwing 
>> exceptions out
>> > of standard classes, we need to take some care.
>>
>> sorry, I did not catch. Most of the exceptions even originating in
>> some internal
>> classes are finally go to a user app over some standard class.
>>
>> >
>> > >
>> > > Should we now roll back for example Harmony-250?
>> >
>> > I don't think so - did it actually undo RI-like exception messages, or
>> > just improve some?
>>
>> In some cases RI throws someting like "invalid arguments" instead of
>> throwing e.g. "invalid A" when arg A is invalid and "invalid B" when 
>> arg B
>> is invalid.
>>
>> So before the fix we like RI threw one message and now we throw 
>> different
>> messages:
>> -        if ((key == null) || (key.length == 0) || (algorithm == 
>> null)) {
>> -            throw BADPARAMS_EXC;
>> -        }
>> +        if (algorithm == null) throw ALG_NULL_EXC;
>> +        if (key == null) throw KEY_NULL_EXC;
>> +        if (key.length == 0) throw KEY_TOO_SHORT_EXC;
>>
>
> Gentlemen,
>
> For the cited patch, I consider Harmony behavior much more user
> friendly and would happily vote for retaining such fixes. I'd hardly
> imagine sane application depending on that message, while everyday
> users would benefit from detailed messages. Let's listen to voice of
> common sense occasionally ;)
> Just my 0.02$
>
Yes. We're allowed to output the same exception messages. But if you we 
think the messages of RI are not helpful or we could give more helpful 
messages to users, we could output different messages. Thanks a lot.

Best regards,
Richard.
> -- 
> Alexey
>
> [snip]
>
> ---------------------------------------------------------------------
> 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
>
>

-- 
Richard Liang
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