From 514ccb85e6138588bebc96bb165711582658423c Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Sun, 2 Jan 2011 21:29:08 +0000 Subject: #1012822 by dww: Fixed exception handling while downloading/verifying a tarball in update manager. --- modules/update/update.manager.inc | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'modules/update') diff --git a/modules/update/update.manager.inc b/modules/update/update.manager.inc index 9ad0d08e0..0e699522a 100644 --- a/modules/update/update.manager.inc +++ b/modules/update/update.manager.inc @@ -580,8 +580,21 @@ function update_manager_install_form_submit($form, &$form_state) { drupal_get_updaters(); $project_location = $directory . '/' . $project; - $updater = Updater::factory($project_location); - $project_title = Updater::getProjectTitle($project_location); + try { + $updater = Updater::factory($project_location); + } + catch (Exception $e) { + form_set_error($field, $e->getMessage()); + return; + } + + try { + $project_title = Updater::getProjectTitle($project_location); + } + catch (Exception $e) { + form_set_error($field, $e->getMessage()); + return; + } if (!$project_title) { form_set_error($field, t('Unable to determine %project name.', array('%project' => $project))); -- cgit v1.2.3