异常:Mongoid::Errors::DocumentNotDestroyed

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

Overview

尝试销毁销毁回调返回 false 的文档时引发此警报。

常量摘要

MongoidError继承的常量

MongoidError::BASE_KEY

实例属性摘要

MongoidError继承的属性

#问题#分辨率#summary

实例方法摘要折叠

MongoidError继承的方法

#compose_message

构造函数详情

#initialize ( ID , klass) = "DocumentNotDestroyed"

实例化异常。

例子:

创建错误。

DocumentNotDestroyed.new(Band)

参数:

  • id ( Object )

    文档ID。

  • klass ( class )

    文档类。



18
19
20
# File 'lib/mongoid/errors/document_not_destroyed.rb', line 18

def 初始化(id, klass)
  (compose_message(" document_not_destroyed ", { ID : id.检查, 类: klass }))
end