Uploaded image for project: 'SwitchYard'
  1. SwitchYard
  2. SWITCHYARD-1890

ExchangeInvocation does not include exception hierarchy when dealing with fault replies

    Details

      Description

      The invoke() method in ExchangeInvocation treats all fault messages as though they do not contain exceptions due to some faulty logic:

                if (_replyHandler.isFault()) {
                  Object error = _replyHandler.getExchange().getMessage();
      
                  // Handling case where fault content is not an exception
                  if (!Throwable.class.isAssignableFrom(error.getClass())) {
                      throw createException(_replyHandler.getExchange());
                  }
      

      Note how the return from getMessage() is assigned to the error var instead of getMessage().getContent(). This means all exceptions are converted to Strings. Good news is that no error content is lost since the conversion to String includes the entire exception hierarchy. Bad news is that if you are hunting for the actual Exception reference in code that uses ExchangeInvocation, you'll be disappointed.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                kcbabo Keith Babo
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: