commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ole Ersoy (JIRA)" <>
Subject [jira] Commented: (MATH-361) Localization and Error Handling
Date Fri, 09 Jul 2010 22:09:51 GMT


Ole Ersoy commented on MATH-361:

I agree with the thinking there.  Also since each CM core library class (Say GammaDistribution)
does not directly depend on GammaDistributionMessageEnum, these enums can easily exist in
their own jar, separately from the core CM library (But should still be a part of CM).  The
package namespace should stay the same also.  So for example if I look in the message enum
jar under the namespace 
org.apache.commons.math.distribution I see:
* BetaDistributionMessageEnum
* BinomialDistributionMessageEnum
* CauchyDistributionMessageEnum
* Etc.

Also in order to make the javadoc for the core CM library less verbose, the use case description
javadoc could go in the MessageEnum classes.  This way the core CM library stays very minimal
and easy to maintain.  Having the per class enums also then provides a more natural home to
place developer friendly comments on how to go about providing the best end user experience
for a given core CM class.  This could also have a dual purpose as a best practice checklist
to the developer, reminding them of things they should do when developing with a core library

Another thing is that if it's done like this, CM does not really have to care how the messages
are resolved.  CM could provide a utility if it wants to (might as well since it needs to
resolve the core minimal enum messages), but the application developer does not have to use
this utility.   The application developer could resolve the enum messages using CAL10N if
she wants to.

> Localization and Error Handling
> -------------------------------
>                 Key: MATH-361
>                 URL:
>             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 []

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

View raw message