commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz (JIRA)" <j...@apache.org>
Subject [jira] Commented: (MATH-361) Localization and Error Handling
Date Mon, 28 Jun 2010 01:43:50 GMT

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

Phil Steitz commented on MATH-361:
----------------------------------

Hopefully we can have it both ways here - improve the exception hierarchy and maintain informative
failure-capture information in exception messages.  I don't think it makes sense to argue
about who the exception messages are for - developers at all levels in the application hierarchy,
end users (in some cases) or production support people may all have occasion to look at stack
traces or exception error messages.  We are all thankful to API developers who provide good
exception error messages. Currently, commons math provides pretty good failure-capture information
in exception messages and I would like to make sure that we do not lose that.  We can add
more state and structure to the exception hierarchy, but I would like to see us maintain informative
exception error messages including meaningful failure context information.

I understand and support the desire to reduce the number of distinct error messages that we
maintain in the enums, but I really think we need to balance user (that means whoever is looking
at stack traces or logs including our exception messages) convenience with making things simpler
for us.  If I were chasing down a bug in my upper level code that was trying to create a gamma
distribution with a negative shape parameter, I would find my problem quickly if I saw an
IllegalArgumentException thrown by setAlphaInternal with a message telling me that alpha was
negative.  However we refactor things, I want it to stay that easy - no needless forays into
the javadoc (which may not always be readily available) or having to insert instrumentation
to recover failure-capture information.

> 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