[
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/[email protected]/msg14570.html]
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.