File: node_test_exception.module

package info (click to toggle)
drupal7 7.14-2%2Bdeb7u12
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 24,516 kB
  • sloc: php: 42,979; pascal: 39,064; sh: 1,622; xml: 441; makefile: 14; sql: 1
file content (16 lines) | stat: -rw-r--r-- 334 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?php

/**
 * @file
 * Dummy module implementing node related hooks to test API interaction with
 * the Node module.
 */

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