Class GaiException

  • All Implemented Interfaces:
    Serializable

    public final class GaiException
    extends RuntimeException
    An unchecked exception thrown when getaddrinfo or getnameinfo fails. This exception contains the native error value, should sophisticated callers need to adjust their behavior based on the exact failure.
    See Also:
    Serialized Form
    • Field Detail

      • error

        public final int error
        The native error value, for comparison with the GAI_ constants in OsConstants.
    • Constructor Detail

      • GaiException

        public GaiException​(String functionName,
                            int error)
        Constructs an instance with the given function name and error value.
      • GaiException

        public GaiException​(String functionName,
                            int error,
                            Throwable cause)
        Constructs an instance with the given function name, error value, and cause.