[
https://issues.apache.org/jira/browse/GEOMETRY-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16616477#comment-16616477
]
Matt Juntunen commented on GEOMETRY-8:
--------------------------------------
I like the idea of having the exceptions as part of the public API. The two
main advantages I see are
# users could easily see what types of situations result in GeometryExceptions
by looking at the inheritance hierarchy in the public API, and
# users would be able to take different actions in catch clauses based on the
type of exception thrown.
The latter reason is probably the biggest. For example, I could picture myself
in a situation where an IllegalNormException might indicate something wrong
with the input data and a NonInvertibleTransformException (which doesn't exist
yet but will) might indicate something wrong with an algorithm.
This might be a question to revisit after some of the other refactoring is done
since the situation might be a little different at that point.
Do you have any objections to marking this issue as complete?
> Update Exception Instantiation
> ------------------------------
>
> Key: GEOMETRY-8
> URL: https://issues.apache.org/jira/browse/GEOMETRY-8
> Project: Apache Commons Geometry
> Issue Type: Task
> Reporter: Matt Juntunen
> Priority: Major
>
> Update exception instantiation following the pattern in commons-numbers, eg.
> custom private exception types created through factories. See the discussion
> on GEOMETRY-2 and the GammaException class and its use in LogBeta in
> commons-numbers.
>
> Based on discussion in GEOMETRY-9, we are going to implement our own
> exception hierarchy for this component, eg GeometryException and subclasses.
>
> Pull request: [https://github.com/apache/commons-geometry/pull/9]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)