SocketException

  • SocketException signals an error during socket creation or access.

  • It's a subclass of IOException and has specific subtypes for bind, connect, routing, and port unreachability errors.

  • Two constructors allow for creating a SocketException with or without a detailed error message.

  • It inherits methods from Throwable for stack trace and error handling.

public class SocketException extends IOException
Known Direct Subclasses

Thrown to indicate that there is an error creating or accessing a Socket.

Public Constructor Summary

SocketException(String msg)
Constructs a new SocketException with the specified detail message.
SocketException()
Constructs a new SocketException with no detail message.

Inherited Method Summary

Public Constructors

public SocketException (String msg)

Constructs a new SocketException with the specified detail message.

Parameters
msg the detail message.

public SocketException ()

Constructs a new SocketException with no detail message.