[
https://issues.apache.org/jira/browse/MATH-425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12931402#action_12931402
]
Gilles commented on MATH-425:
-----------------------------
Perhaps I didn't explain in sufficient details: I don't mean that user
exceptions are useless, just that wrapping them in types of CM's choosing is.
In my example, I find that the raised {{IllegalArgumentException}} is very much
useful, and the same for any user-generated exception.
What I said and, stick with, is: Let CM be neutral.
But if you insist on "suggesting" things to users, I agree with you on defining
a "UserException". In fact, I had the same idea, but did not put it forward
because, as you know, I think that we can do without. ;-)
This class would make it clear that it is the user's responsibility to
instantiate such objects.
Nevertheless, why complicate things by implementing various derived classes
(i.e. {{MatrixVisitorException}} and {{FunctionEvaluationException}}) within
CM, since "UserException" can encompass everything user-related)? The Javadoc
of that single "UserException" class can even clearly indicate that it is a
suggestion intended to be a communication channel (which CM will not interfere
with) between lower and upper level codes. Users can then decide whether and
when to use it. And we don't have to "suggest" anything else anywhere else
within CM. Now, _that_ starts to look like the best of both worlds...
> 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.