Uploaded image for project: 'UIMA'
  1. UIMA
  2. UIMA-5078

UIMA DUCC: http dispatch code doesn't rethrow exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.1.0-Ducc
    • DUCC
    • None

    Description

      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.

      Attachments

        Activity

          People

            cwiklik Jaroslaw Cwiklik
            cwiklik Jaroslaw Cwiklik
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: