Skip to content

Commit 5cee193

Browse files
committed
java: Stop polluting console with stack traces
1 parent bbf838e commit 5cee193

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

Diff for: java/client/src/org/openqa/selenium/firefox/internal/MarionetteConnection.java

+3-6
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,12 @@ public void start() throws IOException {
144144
}
145145
}
146146
} catch (IOException e) {
147-
e.printStackTrace();
148147
throw new WebDriverException(
149-
String.format("Failed to connect to binary %s on port %d; process output follows: \n%s",
148+
String.format("Failed to connect to binary %s on port %d; process output follows: %n%s",
150149
process.toString(), port, process.getConsoleOutput()), e);
151150
} catch (WebDriverException e) {
152151
throw new WebDriverException(
153-
String.format("Failed to connect to binary %s on port %d; process output follows: \n%s",
152+
String.format("Failed to connect to binary %s on port %d; process output follows: %n%s",
154153
process.toString(), port, process.getConsoleOutput()), e);
155154
} catch (Exception e) {
156155
throw new WebDriverException(e);
@@ -160,7 +159,7 @@ public void start() throws IOException {
160159

161160
// Marionette sends back an initial acknowledgement response upon first
162161
// connect. We need to read that response before we can proceed.
163-
String rawResponse = receiveResponse();
162+
String ignored = receiveResponse();
164163

165164
// This initializes the "actor" for future communication with this instance.
166165
sendCommand(serializeCommand(new Command(null, "getMarionetteID")));
@@ -230,7 +229,6 @@ public Response execute(Command command) throws IOException {
230229
}
231230

232231
private String serializeCommand(Command command) {
233-
// System.out.println("Command " + command);
234232
String commandName = command.getName();
235233
Map<String, Object> params = Maps.newHashMap();
236234
params.putAll(command.getParameters());
@@ -343,7 +341,6 @@ public void quit() {
343341
reader.close();
344342
socket.close();
345343
} catch (IOException e) {
346-
e.printStackTrace();
347344
}
348345
socket = null;
349346
// This should only be called after the QUIT command has been sent,

0 commit comments

Comments
 (0)