Re: Proposal: Change in behavior of ulocdata_getExemplarSet

Deborah Goldsmith <[email protected]> Wed, 6 Oct 2004 18:21:23 -0700
Newsgroups gmane.comp.lib.icu.general
Message-ID <[email protected]>
I will implement this to set U_USING_DEFAULT_WARNING when it returns 
the empty set, so it should be consistent with the behavior of other 
APIs.

Deborah

On Oct 1, 2004, at 3:38 PM, Markus Scherer wrote:

> Deborah Goldsmith wrote:
>> The proposal is to change the behavior so that 
>> ulocdata_getExemplarSet returns an empty set in such cases. An 
>> alternative would be to return a "resource not found" error code, but 
>> that would be a larger change in behavior.
>
> Sounds good - but I have a bit of a concern that this will then behave 
> differently from other APIs. While our use of warning (non-failure) 
> UErrorCode codes for default/fallback results has turned out to not be 
> a good idea, it's pretty consistent.
>
> In other words, you should currently get a default-warning code which 
> passes U_SUCCESS() and is only reasonably reliable if you preset the 
> error code precisely to U_ZERO_ERROR. (Warnings are not cleared out 
> automatically.)
>
> This is fragile, but standard - and the proposal fixes it but makes it 
> non-standard - so I don't really know what to recommend.
>
> What does everyone else think?
>
> markus
> -- 
> Opinions expressed here may not reflect my company's positions unless 
> otherwise noted.
> _______________________________________________
> icu mailing list
> [email protected]
> http://oss.software.ibm.com/developerworks/oss/mailman/listinfo/icu