Exception: Mongo::Error::UnsupportedFeatures

Inherits:
Mongo::Error
  • Object
show all
Defined in:
lib/mongo/error/unsupported_features.rb

Overview

Raised when the driver does not support the complete set of server features.

Since:

  • 2.0.0

Constant Summary

Constants inherited from Mongo::Error

BAD_VALUE, CODE, CURSOR_NOT_FOUND, ERR, ERRMSG, ERROR, UNKNOWN_ERROR, WRITE_CONCERN_ERROR, WRITE_CONCERN_ERRORS, WRITE_ERRORS

Instance Method Summary collapse

Constructor Details

#initialize(server_wire_versions) ⇒ UnsupportedFeatures

Initialize the exception.

Examples:

Initialize the exception.

Unsupported.new(0..3)

Parameters:

  • server_wire_versions (Range)

    The server's supported wire versions.

Since:

  • 2.0.0



33
34
35
36
37
38
39
40
# File 'lib/mongo/error/unsupported_features.rb', line 33

def initialize(server_wire_versions)
  super(
    "This version of the driver, #{Mongo::VERSION}, only supports wire " +
    "protocol versions #{Server::Description::Features::DRIVER_WIRE_VERSIONS} " +
    "and the server supports wire versions #{server_wire_versions}. " + 
    "Please upgrade the driver to be able to support this server version."
  )
end