[
https://issues.apache.org/jira/browse/UIMA-5869?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16623592#comment-16623592
]
Marshall Schor commented on UIMA-5869:
--------------------------------------
I'm not following the arguments pro/con.
To be clear, an "unchecked" exception is one like CasRuntimeException. These
do not require that the caller handle the exception.
A "checked" exception requires that the call handle the exception or declare in
the method header a "throws" clause, which would, in turn require the caller of
this to handle the exception, recursively.
Changing this from an unchecked exception to a checked exception would very
likely cause compile errors for code that doesn't currently have handlers for
this condition, which is the opposite conclusion from the description above
(but maybe I've misunderstood something?).
> The JCas getView method throws CasRuntimeException not CasException
> -------------------------------------------------------------------
>
> Key: UIMA-5869
> URL: https://issues.apache.org/jira/browse/UIMA-5869
> Project: UIMA
> Issue Type: Bug
> Components: Core Java Framework
> Affects Versions: 2.10.2SDK, 3.0.0SDK
> Reporter: Burn Lewis
> Priority: Minor
>
> Code that uses JCas getView expects CasException to be thrown if a view is
> missing, but instead the underlying CAS.getView method throws
> CasRuntimeException.
> Either the code or the Javadocs should be fixed. Since a missing view is not
> uncommon, throwing an unchecked exception is not very useful. Making the
> framework code match the Javadocs should have tminimal impact on existing
> user code.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)