Exception: Mongo::Error::InvalidServerPreference

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

Overview

Raised when an invalid server preference is provided.

Since:

  • 2.0.0

Constant Summary

Constants inherited from Mongo::Error

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

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ InvalidServerPreference

Instantiate the new exception.

Examples:

Instantiate the exception.

Mongo::ServerSelector::InvalidServerPreference.new

Parameters:

  • name (String)

    The preference name.

Since:

  • 2.0.0



31
32
33
# File 'lib/mongo/error/invalid_server_preference.rb', line 31

def initialize(name)
  super("This server preference #{name} cannot be combined with tags.")
end