A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/seleniumhq/selenium/commit/3738c97dbff86cfa8d574245605d928ed71a07bb below:

[java] Removing host info for most cases, except SessionNotCreatedExc… · SeleniumHQ/selenium@3738c97 · GitHub

File tree Expand file treeCollapse file tree 3 files changed

+11

-8

lines changed

Filter options

Expand file treeCollapse file tree 3 files changed

+11

-8

lines changed Original file line number Diff line number Diff line change

@@ -22,10 +22,12 @@

22 22

*/

23 23

public class SessionNotCreatedException extends WebDriverException {

24 24

public SessionNotCreatedException(String msg) {

25 -

super("Could not start a new session. " + msg);

25 +

super("Could not start a new session. " + msg +

26 +

(msg != null && msg.contains("Host info") ? "" : " \n" + getHostInformation()));

26 27

}

27 28 28 29

public SessionNotCreatedException(String msg, Throwable cause) {

29 -

super("Could not start a new session. " + msg, cause);

30 +

super("Could not start a new session. " + msg +

31 +

(msg != null && msg.contains("Host info") ? "" : " \n" + getHostInformation()), cause);

30 32

}

31 33

}

Original file line number Diff line number Diff line change

@@ -19,7 +19,6 @@

19 19 20 20

import org.openqa.selenium.net.HostIdentifier;

21 21 22 -

import java.util.HashMap;

23 22

import java.util.Map;

24 23

import java.util.Optional;

25 24

import java.util.concurrent.ConcurrentHashMap;

@@ -54,7 +53,6 @@ public WebDriverException(String message, Throwable cause) {

54 53

* Returns the detail message string of this exception that includes not only the original

55 54

* message passed to the exception constructor but also driver information, system

56 55

* information and extra information added by {@link #addInfo(String, String)} method.

57 -

*

58 56

* To get the original message use {@link #getRawMessage()}

59 57

*

60 58

* @return the detail message string of this exception.

@@ -91,12 +89,17 @@ private String createMessage(String originalMessageString) {

91 89 92 90

public String getSystemInformation() {

93 91

return String.format(

94 -

"System info: host: '%s', ip: '%s', os.name: '%s', os.arch: '%s', os.version: '%s', java.version: '%s'",

95 -

HostIdentifier.getHostName(), HostIdentifier.getHostAddress(),

92 +

"System info: os.name: '%s', os.arch: '%s', os.version: '%s', java.version: '%s'",

96 93

System.getProperty("os.name"), System.getProperty("os.arch"),

97 94

System.getProperty("os.version"), System.getProperty("java.version"));

98 95

}

99 96 97 +

public static String getHostInformation() {

98 +

return String.format(

99 +

"Host info: host: '%s', ip: '%s'",

100 +

HostIdentifier.getHostName(), HostIdentifier.getHostAddress());

101 +

}

102 + 100 103

public String getSupportUrl() {

101 104

return null;

102 105

}

Original file line number Diff line number Diff line change

@@ -79,8 +79,6 @@ public class ErrorCodes {

79 79

public static final int UNEXPECTED_ALERT_PRESENT = 26;

80 80

public static final int NO_ALERT_PRESENT = 27;

81 81

public static final int ASYNC_SCRIPT_TIMEOUT = 28;

82 -

public static final int IME_NOT_AVAILABLE = 30;

83 -

public static final int IME_ENGINE_ACTIVATION_FAILED = 31;

84 82

public static final int INVALID_SELECTOR_ERROR = 32;

85 83

public static final int SESSION_NOT_CREATED = 33;

86 84

public static final int MOVE_TARGET_OUT_OF_BOUNDS = 34;

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4