home | career | drupal | java | mac | mysql | perl | php | scala | uml | unix

Drupal example source code file (node_test_exception.module)

This example Drupal source code file (node_test_exception.module) is included in the DevDaily.com "Drupal Source Code Warehouse" project. The intent of this project is to help you "Learn Drupal by Example".

PHP - Drupal tags/keywords

for, function, if, new, node, node_test_exception_node_insert, php, rollback, testing_transaction_exception, throw

The node_test_exception.module Drupal example source code

// $Id: node_test_exception.module,v 1.4 2010/01/09 21:54:01 webchick Exp $

 * @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.');

Other Drupal examples (source code examples)

Here is a short list of links related to this Drupal node_test_exception.module source code file:

new blog posts

"Drupal" is a registered trademark of Dries Buytaert.

my drupal tutorials and examples  

Copyright 1998-2016 Alvin Alexander, alvinalexander.com
All Rights Reserved.

Beginning in 2016, a portion of the proceeds from pages under the '/drupal-code-examples/' URI will be donated to charity.