Serializable
BulkWriteException
, MongoBulkWriteException
, MongoCommandException
, MongoQueryException
, MongoWriteConcernException
, MongoWriteException
, WriteConcernException
public abstract class MongoServerException extends MongoException
TRANSIENT_TRANSACTION_ERROR_LABEL, UNKNOWN_TRANSACTION_COMMIT_RESULT_LABEL
Constructor | Description |
---|---|
MongoServerException(int code,
String message,
ServerAddress serverAddress) |
Construct a new instance.
|
MongoServerException(String message,
ServerAddress serverAddress) |
Construct a new instance.
|
Modifier and Type | Method | Description |
---|---|---|
ServerAddress |
getServerAddress() |
Gets the address of the server.
|
addLabel, fromThrowable, fromThrowableNonNull, getCode, getErrorLabels, hasErrorLabel, removeLabel
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public MongoServerException(String message, ServerAddress serverAddress)
message
- the message from the serverserverAddress
- the address of the serverpublic MongoServerException(int code, String message, ServerAddress serverAddress)
code
- the error code from the servermessage
- the message from the serverserverAddress
- the address of the serverpublic ServerAddress getServerAddress()