From 1a88fce09618a86093cb6db71a088a5265184fd4 Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Tue, 8 Jun 2010 05:29:05 +0000 Subject: #774882 by puregin, Berdir, rfay: Fixed update.php: errors are not logged. --- includes/update.inc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/includes/update.inc b/includes/update.inc index f3df774cc..8ab682faa 100644 --- a/includes/update.inc +++ b/includes/update.inc @@ -733,10 +733,15 @@ function update_do_one($module, $number, $dependency_map, &$context) { $ret['results']['query'] = $function($context['sandbox']); $ret['results']['success'] = TRUE; } - // @TODO We may want to do different error handling for different exception - // types, but for now we'll just print the message. + // @TODO We may want to do different error handling for different + // exception types, but for now we'll just log the exception and + // return the message for printing. catch (Exception $e) { - $ret['#abort'] = array('success' => FALSE, 'query' => $e->getMessage()); + watchdog_exception('update', $e); + + require_once DRUPAL_ROOT . '/includes/errors.inc'; + $variables = _drupal_decode_exception($e); + $ret['#abort'] = array('success' => FALSE, 'query' => t('%type: %message in %function (line %line of %file).', $variables)); } if ($context['log']) { -- cgit v1.2.3