Package java.net

Class NoRouteToHostException

All Implemented Interfaces:
Serializable

public class NoRouteToHostException
extends SocketException
The NoRouteToHostException will be thrown while attempting to connect to a remote host but the host cannot be reached for instance because of a badly configured router or a blocking firewall.

Most applications should not catch this exception; it is more robust to catch the superclass SocketException.

See Also:
Serialized Form
  • Constructor Details

    • NoRouteToHostException

      public NoRouteToHostException()
      Constructs a new instance.
    • NoRouteToHostException

      public NoRouteToHostException​(String detailMessage)
      Constructs a new instance with the given detail message.
    • NoRouteToHostException

      public NoRouteToHostException​(String detailMessage, Throwable cause)
      Constructs a new instance with given detail message and cause.