function node_test_exception_node_insert

Implements hook_node_insert().

File

modules/node/tests/node_test_exception.module, line 11

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.