You are here

node_test_exception.module in Drupal 7

A module implementing node related hooks to test API interaction.

File

modules/node/tests/node_test_exception.module
View source
<?php

/**
 * @file
 * A module implementing node related hooks to test API interaction.
 */

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

Functions