class Mongo::Error::NoServerAvailable

Raised if there are no servers available matching the preference.

@since 2.0.0

Public Class Methods

new(server_selector) click to toggle source

Instantiate the new exception.

@example Instantiate the exception.

Mongo::Error::NoServerAvailable.new(server_selector)

@param [ Hash ] server_selector The server preference that could not be

satisfied.

@since 2.0.0

Calls superclass method
# File lib/mongo/error/no_server_available.rb, line 32
def initialize(server_selector)
  super("No server is available matching preference: #{server_selector.inspect} " +
          "using server_selection_timeout=#{server_selector.server_selection_timeout} " +
          "and local_threshold=#{server_selector.local_threshold}")
end