diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/comment/comment.module | 3 | ||||
-rw-r--r-- | modules/node/node.module | 3 | ||||
-rw-r--r-- | modules/node/node.test | 2 | ||||
-rw-r--r-- | modules/user/user.module | 3 |
4 files changed, 7 insertions, 4 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 66ccef6bc..c997ea2e5 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -1529,7 +1529,8 @@ function comment_save($comment) { } } catch (Exception $e) { - $transaction->rollback('comment', $e->getMessage(), array(), WATCHDOG_ERROR); + $transaction->rollback('comment'); + watchdog_exception('comment', $e); throw $e; } diff --git a/modules/node/node.module b/modules/node/node.module index bc59ea9b3..b942e2e27 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -1090,7 +1090,8 @@ function node_save($node) { db_ignore_slave(); } catch (Exception $e) { - $transaction->rollback('node', $e->getMessage(), array(), WATCHDOG_ERROR); + $transaction->rollback('node'); + watchdog_exception('node', $e); throw $e; } } diff --git a/modules/node/node.test b/modules/node/node.test index db004f6b8..a2ab17308 100644 --- a/modules/node/node.test +++ b/modules/node/node.test @@ -490,7 +490,7 @@ class NodeCreationTestCase extends DrupalWebTestCase { } // Check that the rollback error was logged. - $records = db_query("SELECT wid FROM {watchdog} WHERE message LIKE 'Test exception for rollback.'")->fetchAll(); + $records = db_query("SELECT wid FROM {watchdog} WHERE variables LIKE '%Test exception for rollback.%'")->fetchAll(); $this->assertTrue(count($records) > 0, t('Rollback explanatory error logged to watchdog.')); } } diff --git a/modules/user/user.module b/modules/user/user.module index 0256040b7..ad580dcc3 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -548,7 +548,8 @@ function user_save($account, $edit = array(), $category = 'account') { return $user; } catch (Exception $e) { - $transaction->rollback('user', $e->getMessage(), array(), WATCHDOG_ERROR); + $transaction->rollback(); + watchdog_exception('user', $e); throw $e; } } |