Package org.ldaptive

Class LdapException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ConnectException, FilterParseException, PoolException, SchemaParseException

public class LdapException extends Exception
Base exception for all ldap related exceptions.
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      serialVersionUID.
      See Also:
    • resultCode

      private final ResultCode resultCode
      Optional result code associated with this exception.
  • Constructor Details

    • LdapException

      public LdapException(Result result)
      Creates a new ldap exception based on the supplied result.
      Parameters:
      result - that produced this exception
    • LdapException

      public LdapException(String msg)
      Creates a new ldap exception.
      Parameters:
      msg - describing this exception
    • LdapException

      public LdapException(ResultCode code, String msg)
      Creates a new ldap exception.
      Parameters:
      code - result code describing this exception
      msg - describing this exception
    • LdapException

      public LdapException(Throwable e)
      Creates a new ldap exception.
      Parameters:
      e - underlying exception
    • LdapException

      public LdapException(ResultCode code, Throwable e)
      Creates a new ldap exception.
      Parameters:
      code - result code describing this exception
      e - underlying exception
    • LdapException

      public LdapException(String msg, Throwable e)
      Creates a new ldap exception.
      Parameters:
      msg - describing this exception
      e - underlying exception
    • LdapException

      public LdapException(ResultCode code, String msg, Throwable e)
      Creates a new ldap exception.
      Parameters:
      code - result code describing this exception
      msg - describing this exception
      e - underlying exception
  • Method Details

    • getResultCode

      public ResultCode getResultCode()
      Returns the result code.
      Returns:
      result code or null
    • formatResult

      protected static String formatResult(Result result)
      Formats the supplied result for use as an exception message.
      Parameters:
      result - to format
      Returns:
      formatted result