Throwable e2 = ex.getCause();
if(e2 != null) {
m2 = e2.getMessage();
}
logger.severe("Command execution failed for "+ lastCommandRun);
SSHCommandExecutionException cee = new SSHCommandExecutionException(StringUtils.cat(":",
m1, m2));
cee.setSSHSettings(sshL.toString());
cee.setCommandRun(lastCommandRun);
throw cee;
} catch (java.lang.InterruptedException ei){
ei.printStackTrace();
String m1 = ei.getMessage();
String m2 = "";
Throwable e2 = ei.getCause();
if(e2 != null) {
m2 = e2.getMessage();
}
logger.severe("Command interrupted "+ lastCommandRun);
SSHCommandExecutionException cee = new SSHCommandExecutionException(StringUtils.cat(":",
m1, m2));
cee.setSSHSettings(sshL.toString());
cee.setCommandRun(lastCommandRun);
throw cee;
}
}