diff --git a/src/main/java/com/jcraft/jsch/ChannelSftp.java b/src/main/java/com/jcraft/jsch/ChannelSftp.java index c06d1a7f..f216db71 100644 --- a/src/main/java/com/jcraft/jsch/ChannelSftp.java +++ b/src/main/java/com/jcraft/jsch/ChannelSftp.java @@ -1495,8 +1495,10 @@ public void close() throws IOException { rq.cancel(header, buf); try { _sendCLOSE(handle, header); + } catch (IOException e) { + throw e; } catch (Exception e) { - throw new IOException("error"); + throw new IOException(e.toString(), e); } } };