root / drupal7 / modules / node / tests / node_test_exception.module @ 134c7813
1 | 85ad3d82 | Assos Assos | <?php |
---|---|---|---|
2 | |||
3 | /** |
||
4 | * @file |
||
5 | * A module implementing node related hooks to test API interaction. |
||
6 | */ |
||
7 | |||
8 | /** |
||
9 | * Implements hook_node_insert(). |
||
10 | */ |
||
11 | function node_test_exception_node_insert($node) { |
||
12 | if ($node->title == 'testing_transaction_exception') { |
||
13 | throw new Exception('Test exception for rollback.'); |
||
14 | } |
||
15 | } |