Skip to content

Commit

Permalink
Rework the ErrorCodes one last time. Hopefully.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
shs96c committed Oct 13, 2016
1 parent b1edbb1 commit a9da1a0
Show file tree
Hide file tree
Showing 3 changed files with 175 additions and 212 deletions.
22 changes: 2 additions & 20 deletions java/client/src/org/openqa/selenium/WebDriverException.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,18 @@

package org.openqa.selenium;

import org.openqa.selenium.internal.BuildInfo;

import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.HashMap;
import java.util.Map;

import org.openqa.selenium.internal.BuildInfo;

public class WebDriverException extends RuntimeException {

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

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

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

public WebDriverException(String message, Throwable cause, Integer statusCode) {
super(message, cause);
this.statusCode = statusCode;
}

/**
* DO NOT USE -
* This is to help the standalone server map exceptions from remote ends back to clients without
* losing the original status code provide (if one is). This will be going away in 4.0 when status
* codes are only string messages
* @return status code from the response of the remote end driver.
*/
@Deprecated
public Integer getStatusCode() {
return statusCode;
}

@Override
public String getMessage() {
return createMessage(super.getMessage());
Expand Down
Loading

0 comments on commit a9da1a0

Please sign in to comment.