Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
_registry_update() contains code:
$transaction = db_transaction();
try {
// ...
}
catch (Exception $e) {
$transaction->rollback('registry', $e->getMessage(), array(), WATCHDOG_ERROR);
throw $e;
}
Shouldn't the catch statement be
$transaction->rollback();
watchdog('registry', $e->getMessage(), array(), WATCHDOG_ERROR);
throw $e;
Comment | File | Size | Author |
---|---|---|---|
#1 | 1022426-1-use_watchdog_exception.patch | 450 bytes | bfroehle |
Comments
Comment #1
bfroehle CreditAttribution: bfroehle commentedAnd a patch. Note I've decided to use
watchdog_exception('registry', $e);
for the watchdog message as it seems more appropriate (and more commonly used).Comment #2
catchLooks good.
Comment #3
Dries CreditAttribution: Dries commentedGood catch. Committed to CVS HEAD. Thanks.