异常:Mongoid::Errors::NoClientHosts

继承:
MongoidError
  • 对象
显示全部
定义于:
lib/mongoid/errors/no_client_hosts.rb

Overview

当客户端配置为没有主机时,会出现此错误。

常量摘要

MongoidError继承的常量

MongoidError::BASE_KEY

实例属性摘要

MongoidError继承的属性

#问题#分辨率#summary

实例方法摘要折叠

MongoidError继承的方法

#compose_message

构造函数详情

#initialize (name, config) ⇒ NoClientHosts

创建新的错误。

例子:

创建新的错误。

NoClientHosts.new(:default, {}})

参数:

  • 名称 (符号 | string )

    数据库配置键。

  • config (哈希)

    哈希配置选项。



17
18
19
20
21
22
23
24
# File 'lib/mongoid/errors/no_client_hosts.rb', line 17

def 初始化(名称, config)
  (
    compose_message(
      " no_client_hosts ",
      { 名称: 名称, 配置: config }
    )
  )
end