jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Reschke <julian.resc...@gmx.de>
Subject Re: Oak error codes
Date Tue, 09 Apr 2013 06:34:23 GMT
On 2013-04-09 08:16, Jukka Zitting wrote:
> Hi,
>
> On Mon, Apr 8, 2013 at 6:42 PM, Alexander Klimetschek
> <aklimets@adobe.com> wrote:
>> For localization it's also useful if you could pass through those codes in programmatic
fashion:
>>
>> int OakException#getErrorCode() // or even using enums - YMMV
>
> Yep. I'm thinking of using a string for the "Type" part and an integer
> code for the "NNNN" one, with the wiki used as an informal registry of
> types and codes. That should fit the pluggable nature of Oak better
> than a fixed set of Enum values.
>
>> PS: Note that I am not talking about Java's Throwable#getLocalizedMessage(), as that's
>> generally useless, because the backend such as Oak usually does not and should not
>> know about the current UI language.
>
> Agreed. A better approach is the one used for example in HTTP where a
> "404 Not found" response results in a localized error message based on
> the browser interpreting the "404" error code and ignoring the "Not
> found" part (and typically also the body of the response).
> ...

Um. That's a mis-feature of IE which overrides the response body when 
it's shorter than a certain trigger length.

Best regards, Julian

Mime
View raw message