Exception: Mongoid::Errors::InvalidConfigOption

Inherits:
MongoidError
  • Object
show all
Defined in:
build/mongoid-7.3/lib/mongoid/errors/invalid_config_option.rb

Overview

This error is raised when a bad configuration option is attempted to be set.

Constant Summary

Constants inherited from MongoidError

MongoidError::BASE_KEY

Instance Attribute Summary

Attributes inherited from MongoidError

#problem, #resolution, #summary

Instance Method Summary collapse

Methods inherited from MongoidError

#compose_message

Constructor Details

#initialize(name) ⇒ InvalidConfigOption

Create the new error.

Examples:

Create the new error.

InvalidConfigOption.new(:name, [ :option ])

Parameters:

  • name (Symbol, String)

    The attempted config option name.

Since:

  • 3.0.0



19
20
21
22
23
24
25
26
# File 'build/mongoid-7.3/lib/mongoid/errors/invalid_config_option.rb', line 19

def initialize(name)
  super(
    compose_message(
      "invalid_config_option",
      { name: name, options: Config.settings.keys.map(&:inspect).join(", ") }
    )
  )
end