class Mongoid::Errors::NoClientHosts

This error is raised when a client is configured without hosts.

def initialize(name, config)

Parameters:
  • config (Hash) -- The hash configuration options.
  • name (Symbol | String) -- The db config key.

Other tags:
    Example: Create the new error. -
def initialize(name, config)
  super(
    compose_message(
      "no_client_hosts",
      { name: name, config: config }
    )
  )
end