File: node_test_exception.module

package info (click to toggle)
drupal7 7.32-1%2Bdeb8u12
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 23,496 kB
  • sloc: php: 43,501; pascal: 41,001; sh: 1,635; xml: 466; makefile: 21; sql: 1
file content (15 lines) | stat: -rw-r--r-- 306 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?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.');
  }
}