Uploaded image for project: 'Spring Web Services'
  1. Spring Web Services
  2. SWS-714

MockWebServiceClient.sendRequest swallows StackTrace of exceptions thrown during request processing

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: None
    • Fix Version/s: 2.0.3
    • Component/s: None
    • Labels:
      None

      Description

      imho there is no need to catch the exception in

      public ResponseActions sendRequest(RequestCreator requestCreator) {
      Assert.notNull(requestCreator, "'requestCreator' must not be null");
      try

      { WebServiceMessage request = requestCreator.createRequest(messageFactory); MessageContext messageContext = new DefaultMessageContext(request, messageFactory); messageReceiver.receive(messageContext); return new MockWebServiceClientResponseActions(messageContext); }

      catch (Exception ex)

      { fail(ex.getMessage()); return null; }

      }

      as this swallows any stacktrace. Why not just let the exception propagate?

        Activity

        oakinger Erich Eichinger created issue -
        arjen.poutsma Arjen Poutsma made changes -
        Field Original Value New Value
        Fix Version/s 2.0.3 [ 12197 ]
        Assignee Arjen Poutsma [ arjen.poutsma ]
        arjen.poutsma Arjen Poutsma made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        arjen.poutsma Arjen Poutsma made changes -
        Worklog Id 28436 [ 28436 ]
        Time Spent 4m [ 240 ]
        arjen.poutsma Arjen Poutsma made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Complete [ 8 ]
        arjen.poutsma Arjen Poutsma made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            arjen.poutsma Arjen Poutsma
            Reporter:
            oakinger Erich Eichinger
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - Not Specified
              Not Specified
              Logged:
              Time Spent - 4m
              4m