2009-11-19 04:00:47 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
* Dummy module implementing node related hooks to test API interaction with
|
|
|
|
* the Node module.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2009-12-04 16:49:48 +00:00
|
|
|
* Implements hook_node_insert().
|
2009-11-19 04:00:47 +00:00
|
|
|
*/
|
|
|
|
function node_test_exception_node_insert($node) {
|
2010-01-09 21:54:01 +00:00
|
|
|
if ($node->title == 'testing_transaction_exception') {
|
2009-11-19 04:00:47 +00:00
|
|
|
throw new Exception('Test exception for rollback.');
|
|
|
|
}
|
|
|
|
}
|