Exception: PG::RollbackTransaction
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
::StandardError ,
Exception
|
|
Instance Chain:
self,
::StandardError ,
Exception
|
|
Inherits: |
StandardError
|
Defined in: | lib/pg/exceptions.rb |
Overview
Connection#transaction uses this exception to distinguish a deliberate rollback from other exceptional situations. Normally, raising an exception will cause the .transaction
method to rollback the database transaction and pass on the exception. But if you raise an RollbackTransaction
exception, then the database transaction will be rolled back, without passing on the exception.