Package org.ldaptive
Class LdapException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.ldaptive.LdapException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ConnectException
,FilterParseException
,PoolException
,SchemaParseException
Base exception for all ldap related exceptions.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ResultCode
Optional result code associated with this exception.private static final long
serialVersionUID. -
Constructor Summary
ConstructorsConstructorDescriptionLdapException
(String msg) Creates a new ldap exception.LdapException
(String msg, Throwable e) Creates a new ldap exception.Creates a new ldap exception.LdapException
(Result result) Creates a new ldap exception based on the supplied result.LdapException
(ResultCode code, String msg) Creates a new ldap exception.LdapException
(ResultCode code, String msg, Throwable e) Creates a new ldap exception.LdapException
(ResultCode code, Throwable e) Creates a new ldap exception. -
Method Summary
Modifier and TypeMethodDescriptionprotected static String
formatResult
(Result result) Formats the supplied result for use as an exception message.Returns the result code.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDserialVersionUID.- See Also:
-
resultCode
Optional result code associated with this exception.
-
-
Constructor Details
-
LdapException
Creates a new ldap exception based on the supplied result.- Parameters:
result
- that produced this exception
-
LdapException
Creates a new ldap exception.- Parameters:
msg
- describing this exception
-
LdapException
Creates a new ldap exception.- Parameters:
code
- result code describing this exceptionmsg
- describing this exception
-
LdapException
Creates a new ldap exception.- Parameters:
e
- underlying exception
-
LdapException
Creates a new ldap exception.- Parameters:
code
- result code describing this exceptione
- underlying exception
-
LdapException
Creates a new ldap exception.- Parameters:
msg
- describing this exceptione
- underlying exception
-
LdapException
Creates a new ldap exception.- Parameters:
code
- result code describing this exceptionmsg
- describing this exceptione
- underlying exception
-
-
Method Details
-
getResultCode
Returns the result code.- Returns:
- result code or null
-
formatResult
Formats the supplied result for use as an exception message.- Parameters:
result
- to format- Returns:
- formatted result
-