Uploaded image for project: 'Spring Integration'
  1. Spring Integration
  2. INT-3954

Cannot get inner exception from NestedIOException after SftpSession.remove()

    XMLWordPrintable

    Details

      Description

      Most of the NestedIOExceptions thrown from SftpSession included the underlying SftpException as the cause. There is a typo in the catch on line 83 (line 71 in 2.2.1) of SftpSession.remove() where the comma is replaced by a plus. This causes the message of the NestedIOException to be "Failed to remove file: " plus the message of the inner SftpException, not a nested tree with the SftpException available to calling code.

      I was trying to handle the attempted delete of a missing file nicely in my code, but as it is I have to look at the detail message of the NestedIOException, not the code from the underlying SftpException.

        Attachments

          Activity

            People

            Assignee:
            grussell Gary Russell
            Reporter:
            rabowers Richard Bowers
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: