public Pair<Integer, String> execute(String command, Logger logAppender) throws IOException { Pair<Integer, String> r; if (remoteHost == null) { r = runNativeCommand(command, logAppender); } else { r = runRemoteCommand(command, logAppender); } if (r.getFirst() != 0) throw new IOException("OS command error exit with return code: " + r.getFirst() // + ", error message: " + r.getSecond() + "The command is: \n" + command + (remoteHost == null ? "" : " (remoteHost:" + remoteHost + ")") // ); return r; }
public Pair<Integer, String> execute(String command, Logger logAppender) throws IOException { Pair<Integer, String> r; if (remoteHost == null) { r = runNativeCommand(command, logAppender); } else { r = runRemoteCommand(command, logAppender); } if (r.getFirst() != 0) throw new IOException("OS command error exit with " + r.getFirst() // + (remoteHost == null ? "" : " (remoteHost:" + remoteHost + ")") // + " -- " + command + "\n" + r.getSecond()); return r; }
public Pair<Integer, String> execute(String command, Logger logAppender) throws IOException { Pair<Integer, String> r; if (remoteHost == null) { r = runNativeCommand(command, logAppender); } else { r = runRemoteCommand(command, logAppender); } if (r.getFirst() != 0) throw new IOException("OS command error exit with return code: " + r.getFirst() // + ", error message: " + r.getSecond() + "The command is: \n" + command + (remoteHost == null ? "" : " (remoteHost:" + remoteHost + ")") // ); return r; }
public Pair<Integer, String> execute(String command, Logger logAppender) throws IOException { Pair<Integer, String> r; if (remoteHost == null) { r = runNativeCommand(command, logAppender); } else { r = runRemoteCommand(command, logAppender); } if (r.getFirst() != 0) throw new IOException("OS command error exit with " + r.getFirst() // + (remoteHost == null ? "" : " (remoteHost:" + remoteHost + ")") // + " -- " + command + "\n" + r.getSecond()); return r; }