[haiku-commits] Re: r42605 - haiku/trunk/src/kits/locale

  • From: pulkomandy@xxxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 09 Aug 2011 20:34:37 +0200

> I fail to see the actual point of changing the error code in the first
> place: what use is it to the caller to learn whether or not a problem
> happened in ICU or when trying to lock a resource? Is there any behaviour in
> the caller that might depend on that information?

an error in ICU likely comes from bad input, so we could return B_BAD_DATA 
there. But there may be other problems. That's why right now it returns 
B_ERROR. It would be better to have a closer look at the ICU error code, but 
they don't map really well to Be ones, as they are specific to ICU and the 
way it handles data.

I suggested B_WOULD_BLOCK as there is a locking problem, it may not be the 
right logic. The idea is to differentiate a design problem in the software 
that would lead to locking failure from an ICU error, which is either 
B_BAD_DATA or something system-internal.

-- 
Adrien.

Other related posts: