[ 
https://issues.apache.org/jira/browse/GEOMETRY-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16617048#comment-16617048
 ] 

Matt Juntunen commented on GEOMETRY-8:
--------------------------------------

Here's a better, more concrete example of where at least some GeometryException 
subclasses would be useful: a user loads a set of triangles from a 3D model 
file and begins calculating surface normals and other attributes. If an 
IllegalNormException is thrown during the calculation of the normal, then the 
triangle is degenerate and should be ignored. If some other type of 
GeometryException is thrown in the processing, then something else has gone 
wrong and the exception should be propagated to the caller.

I see what you mean about keeping the public API minimal, though. I think a 
good plan of action here is to hold off on this discussion until some of the 
other outstanding tasks are completed and then take stock of what exception 
types we have (since some may have been added) and what exactly we think is 
actually needed. I've created GEOMETRY-16 for this purpose. In the meantime, 
I'm going to mark this particular issue as closed.

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

Reply via email to