You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gilles Sadowski (Jira)" <ji...@apache.org> on 2019/12/03 16:08:00 UTC

[jira] [Commented] (GEOMETRY-16) Reassess Classes in Exception API

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

Gilles Sadowski commented on GEOMETRY-16:
-----------------------------------------

If there is no way to recover from the exception (e.g. error is in caller's input), I'd think that we should not make specific exceptions part of the public API, i.e. methods should advertize the JDK's {{IllegalAgumentException}}.
If necessary (e.g. to avoid duplication in message formatting), custom exception classes should be defined in an "internal" package".

> Reassess Classes in Exception API
> ---------------------------------
>
>                 Key: GEOMETRY-16
>                 URL: https://issues.apache.org/jira/browse/GEOMETRY-16
>             Project: Apache Commons Geometry
>          Issue Type: Task
>            Reporter: Matt Juntunen
>            Priority: Major
>             Fix For: 1.0
>
>
> Before releasing v1.0 of this project, we should reassess the exception types that are included in the public API to ensure that each class is actually worth including on its own. The overall goal is to keep the exception hierarchy useful but with the smallest possible footprint.
> Some examples of existing types that could be combined are the CardanSingularityException and EulerSingularityException in the Rotation class. It is very unlikely that differentiating between these two types of singularities will be important to users.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)