[
https://issues.apache.org/jira/browse/MATH-361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12878452#action_12878452
]
Gilles commented on MATH-361:
-----------------------------
>From what I can gather from the above description, I'm sure that what you
>propose is an improvement on the current implementation. But I also doubt that
>it addresses all the points I've made.
Especially, is it correct that each literal string key will be replaced with an
equivalent instance of an {{enum}}? If so, it does not solve the issue of a
user who would want to programmatically access specific information (that
should be carried along within a specific, stateful, exception object), and not
just read a message log.
Concerning the dependency:
# No dependency is nice, but reinventing the wheel is _not_ (such as re-writing
a tool to check a re-written localization process...).
# IMHO, CM should not contain any "cosmetic" code, such as localization
handling. It should only be concerned with throwing stateful exceptions.
Couldn't we provide a separate library that, given an exception generated by
CM, would turn it into a localized message?
# What is the problem with having dependencies? Is it good that people use CM
but not that CM use the work of other people?
# My initial proposal contains the possibility of a _pluggable_ localization
framework. This functionality can then be provided through an existing library
or through a wheel invented here ;-). The interface mandates just one method:
{{getMessage}}. [I didn't implement it in the "sandbox" because the dependency
didn't seem to be such a problem for most people.]
# There is no bug in "cal10n" parsing of single quotes; the behaviour is
actually mandated by {{java.text.MessageFormat}}.
> 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.