Commit 1a88fce0 authored by webchick's avatar webchick

#774882 by puregin, Berdir, rfay: Fixed update.php: errors are not logged.

parent 8e8d8274
......@@ -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']) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment