You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Luc Maisonobe <Lu...@free.fr> on 2010/11/15 22:06:58 UTC

[math] missing public methods in new exceptions

Hi all,

As part of the exception revamping in 2.X and 3.0, I noticed the new
exceptions that have been introduced miss some public methods from the
former exceptions. These methods were useful for some user code (at
least mine) so I would propose to reintroduce them to avoid regression.

The methods correspond to the accessors getPattern and getArguments. It
was first simply considered getPattern should be deprecated in 2.2 and
replaced by getLocalizablePattern, but now I think it should be replaced
by getSpecificPattern() and getGeneralPattern().

I propose to add these methods, probably in an interface MathThrowable
together with the getMessage(Locale), getMessage() and
getLocalizedMessage(). This will greatly simplify change for existing
user code.

Any thoughts before I implement this in 2.X and 3.0 ?

Luc

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [math] missing public methods in new exceptions

Posted by Gilles Sadowski <gi...@harfang.homelinux.org>.
Hi Luc.

> As part of the exception revamping in 2.X and 3.0, I noticed the new
> exceptions that have been introduced miss some public methods from the
> former exceptions. These methods were useful for some user code (at
> least mine) so I would propose to reintroduce them to avoid regression.
> 
> The methods correspond to the accessors getPattern and getArguments. It
> was first simply considered getPattern should be deprecated in 2.2 and
> replaced by getLocalizablePattern, but now I think it should be replaced
> by getSpecificPattern() and getGeneralPattern().
> 
> I propose to add these methods, probably in an interface MathThrowable
> together with the getMessage(Locale), getMessage() and
> getLocalizedMessage(). This will greatly simplify change for existing
> user code.

+0

Because I feel that, as they are, these things should have been kept
internal. But if you rely on them, I should not get in the way...


Best,
Gilles

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org