Skip to content

Commit a9da1a0

Browse files
committed
Rework the ErrorCodes one last time. Hopefully.
The previous version was almost impossible for a human being to understand. Following the maxim that you need to be twice as smart to debug something as to write it, going for a nice and clear version instead.
1 parent b1edbb1 commit a9da1a0

File tree

3 files changed

+175
-212
lines changed

3 files changed

+175
-212
lines changed

java/client/src/org/openqa/selenium/WebDriverException.java

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,18 @@
1717

1818
package org.openqa.selenium;
1919

20+
import org.openqa.selenium.internal.BuildInfo;
21+
2022
import java.net.InetAddress;
2123
import java.net.UnknownHostException;
2224
import java.util.HashMap;
2325
import java.util.Map;
2426

25-
import org.openqa.selenium.internal.BuildInfo;
26-
2727
public class WebDriverException extends RuntimeException {
2828

2929
public static final String SESSION_ID = "Session ID";
3030
public static final String DRIVER_INFO = "Driver info";
3131
protected static final String BASE_SUPPORT_URL = "http://seleniumhq.org/exceptions/";
32-
protected Integer statusCode;
3332

3433
private Map<String, String> extraInfo = new HashMap<>();
3534

@@ -49,23 +48,6 @@ public WebDriverException(String message, Throwable cause) {
4948
super(message, cause);
5049
}
5150

52-
public WebDriverException(String message, Throwable cause, Integer statusCode) {
53-
super(message, cause);
54-
this.statusCode = statusCode;
55-
}
56-
57-
/**
58-
* DO NOT USE -
59-
* This is to help the standalone server map exceptions from remote ends back to clients without
60-
* losing the original status code provide (if one is). This will be going away in 4.0 when status
61-
* codes are only string messages
62-
* @return status code from the response of the remote end driver.
63-
*/
64-
@Deprecated
65-
public Integer getStatusCode() {
66-
return statusCode;
67-
}
68-
6951
@Override
7052
public String getMessage() {
7153
return createMessage(super.getMessage());

0 commit comments

Comments
 (0)