Package org.ldaptive

Class LdapException

    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        serialVersionUID.
        See Also:
        Constant Field Values
      • resultCode

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

      • 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 Detail

      • 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