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-425) New exceptions to replace those in package "linear"
Date Fri, 12 Nov 2010 12:09:13 GMT

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

Gilles commented on MATH-425:
-----------------------------

Working on MATH-438, I see that I forgot to deal with {{MatrixVisitorException}}.

It looks like it is in the same category as {{FunctionEvaluationException}}. It has no use
internally: It is never thrown and never caught within CM.
Decidedly, I find the argument of "suggesting" that users throw this exception type rather
shaky. As an example, suppose that they implement a "Visitor" object and the "visit" fails
because it calls a method that throws an {{IllegalArgumentException}}. You can't expect any
more usefulness from wrapping the {{IllegalArgumentException}} inside a {{MatrixVisitorException}}
than letting it propagate upwards. And, at the upper levels, it also doesn't make any difference
what exception is caught because at that point you don't have enough context to correct anything;
so you either ignore the failure and continue (knowing that e.g. a matrix entry might be wrong)
or you abort (let the exception propagate further).
Again my opinion is that the only use is for CM to print a localized message. But to do so,
we should catch (and wrap) all exceptions that could arise from user code. [However I think
that a message such as "Visitor failed" is not worth littering the code with numerous try./catch
blocks.]

So I propose to simply deprecate {{MatrixVisitorException}}.


> New exceptions to replace those in package "linear"
> ---------------------------------------------------
>
>                 Key: MATH-425
>                 URL: https://issues.apache.org/jira/browse/MATH-425
>             Project: Commons Math
>          Issue Type: Improvement
>            Reporter: Gilles
>            Assignee: Gilles
>            Priority: Minor
>             Fix For: 3.0
>
>
> This issue is about removing the current set of exceptions located in the package {{linear}}.
The new exceptions must be located in package {{exception}}.

-- 
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