I had also considered throwing an IllegalArgumentException in the case i outlined (where the number of x values does not match the number of ceofficients [excluding of course b0] )
-----Original Message----- From: J.Pietschmann [mailto:[EMAIL PROTECTED] Sent: Thursday, January 29, 2004 2:14 PM To: Jakarta Commons Developers List Subject: Re: [lang] i18n package proposal Phil Steitz wrote: > I am with Henri here. I would not expect error messages from [math] (or > [collections] or [lang], etc.) to be passed up directly to a gui or end > user console. Designing and managing error messages for the end user to > see should happen at the application level, supported by something like > [resources], IMHO. I would be hesitant to take on the maintenance of > localized [math] error message strings or to load too much content into > these strings. Same would apply to other commons components. This would, however, mean that instead of a generic MathException there should be a ConvergenceFailureException, SingularMatrixException etc. in order to give the application a chance to react properlz without having to parse the error message. Not necessarily a bad thing. In my experience, if a basic library like [math] throws an exception, applications rarely deal with it other than - telling the user an "unexpected math exception" has been caught - throwing it right to the top level, perhaps crashing the whole app In FOP, the code responsible for reading images has something like catch(Exception e) { log("Can't read image"); } This deprives the user basically from all facts which could help in tracking down the problem (for example the specific XML parsing error including line number in case of an SVG image). OTOH, unwinding all possible exceptions is hard, and if we got to the root SAX exception, we'd still have to rely on the actuall message in this exception. Yeah, confused? So am I :-) J.Pietschmann --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]