public function DatabaseTransactionTestCase::rollBackWithoutTransactionErrorHandler in Drupal 7
Special handling of "rollback without transaction" errors.
File
- modules/
simpletest/ tests/ database_test.test, line 3780
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.');
}
_drupal_error_handler($error_level, $message, $filename, $line);
}