Skip to content

Commit

Permalink
added error message for slim failure to output
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkogon committed Jul 24, 2015
1 parent 8f2b3e9 commit 94f7ffe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/fitnesse/testsystems/CommandRunner.java
Expand Up @@ -31,6 +31,7 @@ public class CommandRunner {
private Map<String, String> environmentVariables;
private final int timeout;
private final ExecutionLogListener executionLogListener;
private String commandErrorMessage = "";

/**
*
Expand Down Expand Up @@ -79,6 +80,7 @@ public void write(String output) {
@Override
public void write(String output) {
executionLogListener.stdErr(output);
commandErrorMessage = output;
}
}), "CommandRunner stdErr").start();

Expand Down Expand Up @@ -231,4 +233,8 @@ public int waitForCommandToFinish() throws InterruptedException {
private interface OutputWriter {
void write(String output);
}

public String getCommandErrorMessage() {
return commandErrorMessage;
}
}
3 changes: 2 additions & 1 deletion src/fitnesse/testsystems/slim/SlimCommandRunningClient.java
Expand Up @@ -90,7 +90,8 @@ public void connect() throws IOException {
LOG.finest("Trying to connect to host: " + hostName + " on port: " + port + " SSL=" + useSSL + " timeout setting: " + connectionTimeout);
while (client == null) {
if (slimRunner != null && slimRunner.isDead()) {
throw new SlimError("Error SLiM server died before a connection could be established.");
final String slimErrorMessage = "Error SLiM server died before a connection could be established. "+slimRunner.getCommandErrorMessage();
throw new SlimError("Error SLiM server died before a connection could be established.");
}
try {
client = SocketFactory.tryCreateClientSocket(hostName, port, useSSL, sslParameterClassName);
Expand Down

0 comments on commit 94f7ffe

Please sign in to comment.