1 database_test.test public DatabaseTransactionTestCase::rollBackWithoutTransactionErrorHandler($error_level, $message, $filename, $line)

Special handling of "rollback without transaction" errors.

File

core/modules/simpletest/tests/database_test.test, line 3567
Database tests.

Class

DatabaseTransactionTestCase
Test transaction support, particularly nesting.

Code

public function rollBackWithoutTransactionErrorHandler($error_level, $message, $filename, $line) {
  // Throw an exception if this is a "rollback without transaction" error.
  if (strpos($message, 'Rollback attempted when there is no active transaction.') !== FALSE) {
    throw new Exception('Rollback attempted when there is no active transaction.');
  }
  _backdrop_error_handler($error_level, $message, $filename, $line);
}