Package com.mongodb

Class MongoQueryException

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    MongoCursorNotFoundException

    @Deprecated(since="2021-05-27")
    public class MongoQueryException
    extends MongoServerException
    Deprecated.
    Usage of this API is not supported in AEM as a Cloud Service.
    An exception indicating that a query operation failed on the server.
    Since:
    3.0
    See Also:
    Serialized Form
    • Constructor Detail

      • MongoQueryException

        public MongoQueryException​(ServerAddress address,
                                   int errorCode,
                                   java.lang.String errorMessage)
        Deprecated.
        Construct an instance.
        Parameters:
        address - the server address
        errorCode - the error code
        errorMessage - the error message
      • MongoQueryException

        public MongoQueryException​(MongoCommandException commandException)
        Deprecated.
        Construct an instance from a command exception.
        Parameters:
        commandException - the command exception
        Since:
        3.7
    • Method Detail

      • getErrorCode

        public int getErrorCode()
        Deprecated.
        Gets the error code for this query failure.
        Returns:
        the error code
      • getErrorMessage

        public java.lang.String getErrorMessage()
        Deprecated.
        Gets the error message for this query failure.
        Returns:
        the error message