uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jerry Cwiklik (JIRA)" <...@uima.apache.org>
Subject [jira] [Closed] (UIMA-5078) UIMA DUCC: http dispatch code doesn't rethrow exception
Date Wed, 02 Nov 2016 13:51:58 GMT

     [ https://issues.apache.org/jira/browse/UIMA-5078?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jerry Cwiklik closed UIMA-5078.
-------------------------------
    Resolution: Fixed

Rethrows exception 

> UIMA DUCC: http dispatch code doesn't rethrow exception
> -------------------------------------------------------
>
>                 Key: UIMA-5078
>                 URL: https://issues.apache.org/jira/browse/UIMA-5078
>             Project: UIMA
>          Issue Type: Bug
>          Components: DUCC
>            Reporter: Jerry Cwiklik
>            Assignee: Jerry Cwiklik
>             Fix For: 2.1.0-Ducc
>
>
> The BaseHttpDispatcher.dispatchAndWaitForDuccReply() "swallows" exceptions in try ..
catch(). On exception it dumps the trace using e.printStackTrace() never re-throwing it up
to the caller and instead returning null. 
> Modify to rethrow an exception and also modify all code that uses the method in question.
This method is used by the CLI apparently. Modify every instance of code that calls the API
and add try .. catch to handle an exception in a specific way. It looks like the method returning
null is an error condition the client code considers as an error. Seems like a bad practice
to me to use null as an error condition if it is caused by an exception in a generic code
which dispatchAndWaitForDuccReply() in fact is. This code is also called from the PM and perhaps
other places and null as a return value obfuscates the  real cause. Each client should handle
an exception as appropriate. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message