Package com.mongodb

Class MongoServerException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BulkWriteException, MongoBulkWriteException, MongoCommandException, MongoQueryException, MongoWriteConcernException, MongoWriteException, WriteConcernException

@Deprecated(since="2021-05-27") public abstract class MongoServerException extends MongoException
Deprecated.
Usage of this API is not supported in AEM as a Cloud Service.
An exception indicating that some error has been raised by a MongoDB server in response to an operation.
Since:
2.13
See Also:
  • Constructor Details

    • MongoServerException

      public MongoServerException(String message, ServerAddress serverAddress)
      Deprecated.
      Construct a new instance.
      Parameters:
      message - the message from the server
      serverAddress - the address of the server
    • MongoServerException

      public MongoServerException(int code, String message, ServerAddress serverAddress)
      Deprecated.
      Construct a new instance.
      Parameters:
      code - the error code from the server
      message - the message from the server
      serverAddress - the address of the server
  • Method Details

    • getServerAddress

      public ServerAddress getServerAddress()
      Deprecated.
      Gets the address of the server.
      Returns:
      the address