异常:Mongoid::Errors::TransactionError

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

Overview

当ACID 事务由于意外错误而失败时,会引发此错误。

常量摘要

MongoidError继承的常量

MongoidError::BASE_KEY

实例属性摘要

MongoidError继承的属性

#问题#分辨率#summary

实例方法摘要折叠

MongoidError继承的方法

#compose_message

构造函数详情

#initialize(error) ⇒ TransactionError

创建异常。

参数:

  • 错误 ( StandardError )

    导致ACID 事务失败的错误。



15
16
17
18
19
20
21
22
# File 'lib/mongoid/errors/transaction_error.rb', line 15

def 初始化(错误)
  (
    compose_message(
      'transaction_error',
      { 错误: " #{ error . class } : #{ error . message } " }
    )
  )
end