2020import org .openqa .selenium .internal .BuildInfo ;
2121
2222import java .io .BufferedReader ;
23- import java .io .IOException ;
2423import java .io .InputStreamReader ;
2524import java .net .InetAddress ;
2625import java .net .NetworkInterface ;
27- import java .net .SocketException ;
28- import java .net .UnknownHostException ;
2926import java .util .Enumeration ;
3027import java .util .HashMap ;
3128import java .util .Map ;
@@ -67,18 +64,18 @@ public class WebDriverException extends RuntimeException {
6764 host = reader .readLine ();
6865 }
6966 }
70- } catch (IOException ignored ) {
71- // Do nothing and fall through
7267 } catch (InterruptedException e ) {
7368 Thread .currentThread ().interrupt ();
7469 throw new RuntimeException (e );
70+ } catch (Exception e ) {
71+ // fall through
7572 }
7673 }
7774 if (host == null ) {
7875 // Give up.
7976 try {
8077 host = InetAddress .getLocalHost ().getHostName ();
81- } catch (UnknownHostException e ) {
78+ } catch (Exception e ) {
8279 host = "Unknown" ; // At least we tried.
8380 }
8481 }
@@ -96,15 +93,15 @@ public class WebDriverException extends RuntimeException {
9693 address = inetAddress .getHostAddress ();
9794 break ;
9895 }
99- } catch (SocketException e ) {
96+ } catch (Exception e ) {
10097 // Fall through and go the slow way.
10198 }
10299 }
103100 if (address == null ) {
104101 // Alright. I give up.
105102 try {
106103 address = InetAddress .getLocalHost ().getHostAddress ();
107- } catch (UnknownHostException e ) {
104+ } catch (Exception e ) {
108105 address = "Unknown" ;
109106 }
110107 }
0 commit comments