> -----Original Message----- > From: Alex Blewitt [mailto:[EMAIL PROTECTED] > On Tuesday, Aug 19, 2003, at 00:09 Europe/London, Thomas Hawtin wrote: > > What's going to happen in the following situation: > > o Server is running on server with default language French > o User running a web application is using German as a language > > Which of the two will be used to dump exception messages? I > can see two > possibilities: > > 1) The administrator wants to see exceptions in their language in the > logs (French) > 2) The web user will be shown an error message based on an exception, > and hopes that it would be in their language (German) > > I think the only way of achieving this would be to have a > formatExceptionInLocale(Locale) method which could choose the > translation at print time, rather than at construction time.
When I write an application, I almost never print out the text that's in an exception. Instead, I catch it save it with some important context and an identifier, then tell the user to call the helpdesk with that id. With that said, I do not think that possibility #2 should be considered when writing server software since application writers will have their own ideas on what the user should see. As for possibility #1, I agree w/ Jaspreet and think that we should be using resource bundles. Regards, Alan