commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles (JIRA)" <j...@apache.org>
Subject [jira] Commented: (MATH-361) Localization and Error Handling
Date Fri, 09 Jul 2010 00:07:50 GMT

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

Gilles commented on MATH-361:
-----------------------------

Revision 962306 implements some practical middle ground. It is based on my not-so-"clumsy"
suggestion (cf. the end of the lengthy discussion on the "dev" ML) to create a detailed message
from 2 enums.

If the most specific exception classes (i.e. at the bottom of the hierarchy) are not specific
enough, they should provide a second constructor where the first argument is a {{Localizable}}
pattern that further specifies in which context this error occurred. This is similar to what
is passed to the current calls to {{MathRuntimeException.createIllegalArgumentException(...)}}.
In this way:
# There will be zero loss of information at the level of leaked messages.
# It will not be necessary to create a bloated set exception classes.
# The actual problem is reported by a stateful exception.



> Localization and Error Handling
> -------------------------------
>
>                 Key: MATH-361
>                 URL: https://issues.apache.org/jira/browse/MATH-361
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 2.1
>            Reporter: Gilles
>            Priority: Minor
>         Attachments: l10n.tar.gz, res.tar.gz
>
>
> This proposal aims at easing the handling of error during algorithms development, and
also enhancing the flexibility of the error reporting (provide meaningful exception classes
and run-time selection of the localization formatting).
> More details at [http://www.mail-archive.com/dev@commons.apache.org/msg14570.html]

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message