summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-06-08 05:29:05 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-06-08 05:29:05 +0000
commit1a88fce09618a86093cb6db71a088a5265184fd4 (patch)
tree95687eb9cc5a916748ffb2044ea2c899b4693021 /includes
parent8e8d8274d607307ac3d9bf9883f068a7b9d17542 (diff)
downloadbrdo-1a88fce09618a86093cb6db71a088a5265184fd4.tar.gz
brdo-1a88fce09618a86093cb6db71a088a5265184fd4.tar.bz2
#774882 by puregin, Berdir, rfay: Fixed update.php: errors are not logged.
Diffstat (limited to 'includes')
-rw-r--r--includes/update.inc11
1 files 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']) {