Package com.unboundid.ldap.sdk
Class LDAPRuntimeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.unboundid.util.LDAPSDKRuntimeException
com.unboundid.ldap.sdk.LDAPRuntimeException
- All Implemented Interfaces:
Serializable
@NotMutable
@ThreadSafety(level=COMPLETELY_THREADSAFE)
public final class LDAPRuntimeException
extends LDAPSDKRuntimeException
This class defines a version of the
LDAPException class that may be
thrown as a RuntimeException without the need for it to have been
explicitly declared in the method's throws list.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionLDAPRuntimeException(LDAPException ldapException) Creates a new instance of thisLDAPRuntimeExceptionusing the providedLDAPException. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the diagnostic message returned by the directory server.Retrieves a string representation of this exception suitable for use in messages.getExceptionMessage(boolean includeStackTrace, boolean includeCause) Retrieves a string representation of this exception suitable for use in messages.Retrieves theLDAPExceptionobject wrapped by this runtime exception.Retrieves the matched DN for this LDAP exception.String[]Retrieves the set of referral URLs for this LDAP exception.getResponseControl(String oid) Retrieves the response control with the specified OID.Control[]Retrieves the set of response controls for this LDAP exception.Retrieves the result code for this LDAP exception.booleanIndicates whether this result contains at least one control.booleanhasResponseControl(String oid) Indicates whether this result contains at least one control with the specified OID.voidThrows the wrappedLDAPExceptionobject.Creates a newLDAPResultobject from this exception.voidtoString(StringBuilder buffer) Appends a string representation of this exception to the provided buffer.Methods inherited from class com.unboundid.util.LDAPSDKRuntimeException
toStringMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
LDAPRuntimeException
Creates a new instance of thisLDAPRuntimeExceptionusing the providedLDAPException.- Parameters:
ldapException- TheLDAPExceptionobject wrapped by this runtime exception.
-
-
Method Details
-
getLDAPException
Retrieves theLDAPExceptionobject wrapped by this runtime exception.- Returns:
- The
LDAPExceptionobject wrapped by this runtime exception.
-
throwLDAPException
Throws the wrappedLDAPExceptionobject.- Throws:
LDAPException- The wrappedLDAPExceptionobject.
-
getResultCode
Retrieves the result code for this LDAP exception.- Returns:
- The result code for this LDAP exception.
-
getMatchedDN
Retrieves the matched DN for this LDAP exception.- Returns:
- The matched DN for this LDAP exception, or
nullif there is none.
-
getDiagnosticMessage
Retrieves the diagnostic message returned by the directory server.- Returns:
- The diagnostic message returned by the directory server, or
nullif there is none.
-
getReferralURLs
Retrieves the set of referral URLs for this LDAP exception.- Returns:
- The set of referral URLs for this LDAP exception, or an empty array if there are none.
-
hasResponseControl
Indicates whether this result contains at least one control.- Returns:
trueif this result contains at least one control, orfalseif not.
-
hasResponseControl
Indicates whether this result contains at least one control with the specified OID.- Parameters:
oid- The object identifier for which to make the determination. It must not benull.- Returns:
trueif this result contains at least one control with the specified OID, orfalseif not.
-
getResponseControls
Retrieves the set of response controls for this LDAP exception.- Returns:
- The set of response controls for this LDAP exception, or an empty array if there are none.
-
getResponseControl
Retrieves the response control with the specified OID.- Parameters:
oid- The OID of the control to retrieve.- Returns:
- The response control with the specified OID, or
nullif there is no such control.
-
toLDAPResult
Creates a newLDAPResultobject from this exception.- Returns:
- The
LDAPResultobject created from this exception.
-
toString
Appends a string representation of this exception to the provided buffer.- Overrides:
toStringin classLDAPSDKRuntimeException- Parameters:
buffer- The buffer to which the string representation of this exception is to be appended.
-
getExceptionMessage
Retrieves a string representation of this exception suitable for use in messages.- Overrides:
getExceptionMessagein classLDAPSDKRuntimeException- Returns:
- A string representation of this exception suitable for use in messages.
-
getExceptionMessage
Retrieves a string representation of this exception suitable for use in messages.- Overrides:
getExceptionMessagein classLDAPSDKRuntimeException- Parameters:
includeStackTrace- Indicates whether to include information about the cause (if any) in the exception message.includeCause- Indicates whether to include a condensed representation of the stack trace in the exception message.- Returns:
- A string representation of this exception suitable for use in messages.
-