summaryrefslogtreecommitdiff
path: root/modules/node
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-05-26 07:52:13 +0000
committerDries Buytaert <dries@buytaert.net>2010-05-26 07:52:13 +0000
commit72db95c988c57d9ac1b073e9d8a587041d8906f0 (patch)
tree17ad2eb17f2b9b76bdaff14ac4bc0e0106680f0c /modules/node
parent164ac036ac57868723db0b2789961419e92778c4 (diff)
downloadbrdo-72db95c988c57d9ac1b073e9d8a587041d8906f0.tar.gz
brdo-72db95c988c57d9ac1b073e9d8a587041d8906f0.tar.bz2
- Patch #711108 by Berdir: better exception reporting for watchdog() in the database system.
Diffstat (limited to 'modules/node')
-rw-r--r--modules/node/node.module3
-rw-r--r--modules/node/node.test2
2 files changed, 3 insertions, 2 deletions
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.'));
}
}