Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8047351

java.net.NoRouteToHostException error message should have more information

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 6u31
    • core-libs
    • x86
    • os_x

      A DESCRIPTION OF THE REQUEST :
      java.net.PlainSocketImpl.socketConnect(Native Method) can throw a
      "java.net.NoRouteToHostException: No route to host"
      in case of network problem.
      This generic error message does not give any indication of which host can not be reached.

      JUSTIFICATION :
      For more complex network typologies, it would be incredibly useful to know /which/ host can not be reached, but including the desired host name in the exception message.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      java.net.NoRouteToHostException: No route to host "www.example.com"
      ACTUAL -
      java.net.NoRouteToHostException: No route to host

            Unassigned Unassigned
            coffeys Sean Coffey
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: