commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luc Maisonobe (JIRA)" <j...@apache.org>
Subject [jira] Commented: (MATH-542) Allow the addition of multiple messages to the exceptions generated by CM
Date Sun, 06 Mar 2011 15:01:25 GMT

    [ https://issues.apache.org/jira/browse/MATH-542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13003177#comment-13003177
] 

Luc Maisonobe commented on MATH-542:
------------------------------------

I don't think we want to add messages, but key-value pairs.
In [lang] the methods in interface ExceptionContext are:
{code}
public ExceptionContext addValue(String label, Object value);
public Object getValue(String label);
{code}
The purpose is that upper layers can propagate information from one level to an upper level

> Allow the addition of multiple messages to the exceptions generated by CM
> -------------------------------------------------------------------------
>
>                 Key: MATH-542
>                 URL: https://issues.apache.org/jira/browse/MATH-542
>             Project: Commons Math
>          Issue Type: New Feature
>            Reporter: Gilles
>            Assignee: Gilles
>            Priority: Minor
>              Labels: api-change
>             Fix For: 3.0
>
>
> Borrowing on the idea of "ExceptionContext" implemented in [Lang], "MathRuntimeException"
(base class of all exceptions generated from CM) will be enhanced so that an unlimited number
of (localized) messages can be added to an exception object.
> The "MathThrowable" interface (implemented by "MathRuntimeException") will contain the
following new method:
> {code}
> /**
>   * Sets a message.
>   *
>   * @param pattern Message pattern.
>   * @param arguments Values for replacing the placeholders in the message
>   * pattern.
>   */
>   public void addMessage(Localizable pattern,
>                          Object ... arguments);
> {code}

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message