Class DetailedSocketException

  • All Implemented Interfaces:
    java.io.Serializable

    public class DetailedSocketException
    extends java.net.SocketException
    The DetailedSocketException provides (in contradiction to SocketException) an constructor with a Throwable as argument.
    Since:
    2.0 (29.05.2019)
    Author:
    oboehm
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      DetailedSocketException​(java.lang.String msg, java.lang.Throwable cause)
      Constructs a new SocketException with the specified detail message and the given cause.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.net.SocketException of​(java.net.SocketException e, java.lang.String host, int port)
      The given SocketException is checked if it contains the host in the error message.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DetailedSocketException

        public DetailedSocketException​(java.lang.String msg,
                                       java.lang.Throwable cause)
        Constructs a new SocketException with the specified detail message and the given cause.
        Parameters:
        msg - the detail message.
        cause - the cause
    • Method Detail

      • of

        public static java.net.SocketException of​(java.net.SocketException e,
                                                  java.lang.String host,
                                                  int port)
        The given SocketException is checked if it contains the host in the error message. If not it is appended.
        Parameters:
        e - the original SocketException
        host - the host
        port - the port
        Returns:
        a socket exception with more details
        Since:
        2.0