Package com.mongodb
Class MongoSecurityException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.mongodb.MongoException
com.mongodb.MongoClientException
com.mongodb.MongoSecurityException
- All Implemented Interfaces:
Serializable
This exception is thrown when there is an error reported by the underlying client authentication mechanism.
- Since:
- 3.0
-
Field Summary
Fields inherited from class com.mongodb.MongoException
TRANSIENT_TRANSACTION_ERROR_LABEL, UNKNOWN_TRANSACTION_COMMIT_RESULT_LABEL
-
Constructor Summary
ConstructorDescriptionMongoSecurityException
(MongoCredential credential, String message) Construct an instanceMongoSecurityException
(MongoCredential credential, String message, Throwable cause) Construct an instance -
Method Summary
Modifier and TypeMethodDescriptionThe credential being authenticated.Methods inherited from class com.mongodb.MongoException
addLabel, addLabels, addLabels, fromThrowable, fromThrowableNonNull, getCode, getErrorLabels, hasErrorLabel, removeLabel
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
MongoSecurityException
Construct an instance- Parameters:
credential
- the credentialmessage
- the messagecause
- the cause
-
MongoSecurityException
Construct an instance- Parameters:
credential
- the credentialmessage
- the message
-
-
Method Details
-
getCredential
The credential being authenticated.- Returns:
- the credential
-