sendFileToRemote(channel, localFile, remotePath);
} catch (SftpException e) {
JSchException schException = new JSchException("Could not send '" + localFile
+ "' to '" + remotePath + "' - "
+ e.toString());
schException.initCause(e);
throw schException;
}
} finally {
if (channel != null) {
channel.disconnect();