Exception: Mongoid::Errors::TransactionError

Inherits:
MongoidError
  • Object
show all
Defined in:
lib/mongoid/errors/transaction_error.rb

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(error) ⇒ TransactionError

This error is raised when a transaction failed because of an unexpected error.

Parameters:

  • error (StandardError)

    Error that caused the transaction failure.



12
13
14
15
16
17
18
19
# File 'lib/mongoid/errors/transaction_error.rb', line 12

def initialize(error)
  super(
    compose_message(
      'transaction_error',
      { error: "#{error.class}: #{error.message}" }
    )
  )
end