Class LDAPConnectionException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.nimbusds.common.ldap.LDAPConnectionException
All Implemented Interfaces:
Serializable

public class LDAPConnectionException extends Exception
LDAP connection exception.
See Also:
  • Constructor Details

    • LDAPConnectionException

      Creates a new LDAP connection exception, with no specific cause type.
      Parameters:
      message - The exception message. Should not be null.
    • LDAPConnectionException

      Creates a new LDAP connection exception.
      Parameters:
      message - The exception message. Should not be null.
      causeType - The cause type, null if not specified.
    • LDAPConnectionException

      Creates a new LDAP connection exception.
      Parameters:
      message - The exception message. Should not be null.
      causeType - The cause type, null if not specified.
      cause - The exception cause, null if not specified.
  • Method Details

    • parse

      public static LDAPConnectionException parse(com.unboundid.ldap.sdk.LDAPException e)
      Creates a new LDAP connection exception from the specified LDAP SDK exception.

      This method contains special logic to compensate for a "bug" in the Unboundid LDAP SDK (found in 1.1.3) where network errors are poorly reported: instead of throwing a java.net.* exception, the SDK produces a general IOException where you need to scan its message text to find out the exact network cause (see unbounded.ldap.sdk.LDAPConnectionInternals() #line 142).

      Parameters:
      e - The LDAP SDK exception. Must not be null.
      Returns:
      The matching LDAP connection exception.
    • getCauseType

      Gets the cause type.
      Returns:
      The cause type.