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
public class LdapException extends Exception
Base exception for all ldap related exceptions.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private ResultCode
resultCode
Optional result code associated with this exception.private static long
serialVersionUID
serialVersionUID.
-
Constructor Summary
Constructors Constructor Description LdapException(String msg)
Creates a new ldap exception.LdapException(String msg, Throwable e)
Creates a new ldap exception.LdapException(Throwable e)
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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static String
formatResult(Result result)
Formats the supplied result for use as an exception message.ResultCode
getResultCode()
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 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 exceptionmsg
- 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 exceptione
- underlying exception
-
LdapException
public LdapException(String msg, Throwable e)
Creates a new ldap exception.- Parameters:
msg
- describing this exceptione
- underlying exception
-
LdapException
public LdapException(ResultCode code, String msg, Throwable e)
Creates a new ldap exception.- Parameters:
code
- result code describing this exceptionmsg
- describing this exceptione
- underlying exception
-
-
Method Detail
-
getResultCode
public ResultCode getResultCode()
Returns the result code.- Returns:
- result code or null
-
-