Hi, On Mon, Apr 8, 2013 at 6:42 PM, Alexander Klimetschek <[email protected]> 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). BR, Jukka Zitting
