Class LDAPException

  • All Implemented Interfaces:
    Serializable

    public class LDAPException
    extends Exception
    Represents an exception that can be thrown when general errors occur, or if a problem occurs while performing an LDAP operation.
    See Also:
    Serialized Form
    • Constructor Detail

      • LDAPException

        public LDAPException​(int resultCode,
                             String errorMessage,
                             String matchedDN,
                             Throwable cause)
        Constructs a new LDAPException with the specified result code, error message, matched DN and cause.
      • LDAPException

        public LDAPException​(int resultCode,
                             String errorMessage,
                             Throwable cause)
        Constructs a new LDAPException with the specified result code, error message and cause.
      • LDAPException

        public LDAPException​(int resultCode,
                             String errorMessage)
        Constructs a new LDAPException with the specified result code and error message.
      • LDAPException

        public LDAPException​(String errorMessage,
                             Throwable cause)
        Constructs a new LDAPException with the specified error message and cause.
      • LDAPException

        public LDAPException​(String errorMessage)
        Constructs a new LDAPException with the specified error message.
    • Method Detail

      • getResultCode

        public int getResultCode()
        Returns the result code from this LDAPException.
        Returns:
        the result code or -1 if value not set.
      • getMatchedDN

        public String getMatchedDN()
        Returns the matched DN from this LDAPException.
        Returns:
        the matched DN.
      • hasResultCode

        public boolean hasResultCode()
        Reports whether the result code value was set for this LDAPException.
        Returns:
        true if the result code value was set or false otherwise.