123456789_123456789_123456789_123456789_123456789_

Exception: ActiveRecord::TransactionRollbackError

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Subclasses:
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: ActiveRecord::StatementInvalid
Defined in: activerecord/lib/active_record/errors.rb

Overview

TransactionRollbackError will be raised when a transaction is rolled back by the database due to a serialization failure or a deadlock.

These exceptions should not be generally rescued in nested transaction blocks, because they have side-effects in the actual enclosing transaction and internal Active Record state. They can be rescued if you are above the root transaction block, though.

In that case, beware of transactional tests, however, because they run test cases in their own umbrella transaction. If you absolutely need to handle these exceptions in tests please consider disabling transactional tests in the affected test class (self.use_transactional_tests = false).

Due to the aforementioned side-effects, this exception should not be raised manually by users.

See the following:

Class Method Summary

StatementInvalid - Inherited

AdapterError - Inherited

Instance Attribute Summary

Instance Method Summary

Constructor Details

This class inherits a constructor from ActiveRecord::StatementInvalid