1 node_test_exception.module node_test_exception_node_insert(Node $node)

Implements hook_node_insert().

File

core/modules/node/tests/node_test_exception/node_test_exception.module, line 10
A module implementing node related hooks to test API interaction.

Code

function node_test_exception_node_insert(Node $node) {
  if ($node->title == 'testing_transaction_exception') {
    throw new Exception('Test exception for rollback.');
  }
}