From 9dc6193b0c2c3576d86d49d90854876995982df6 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Thu, 27 Jan 2011 10:46:16 +0100 Subject: [PATCH] Catch correct exception. --- kronolith/data.php | 2 +- mnemo/data.php | 2 +- nag/data.php | 2 +- turba/data.php | 10 +++++----- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/kronolith/data.php b/kronolith/data.php index 2e70e2619..c72ce36eb 100644 --- a/kronolith/data.php +++ b/kronolith/data.php @@ -218,7 +218,7 @@ if (!$error && $import_format) { } else { $next_step = $data->nextStep($actionID, $param); } - } catch (Horde_Data_Exception $e) { + } catch (Exception $e) { if ($data) { $notification->push($e, 'horde.error'); $next_step = $data->cleanup(); diff --git a/mnemo/data.php b/mnemo/data.php index 5dd29e80a..0dccaca78 100644 --- a/mnemo/data.php +++ b/mnemo/data.php @@ -98,7 +98,7 @@ if (!$error && $import_format) { try { $data = $injector->getInstance('Horde_Core_Factory_Data')->create($import_format, array('cleanup' => '_cleanupData')); $next_step = $data->nextStep($actionID, $param); - } catch (Horde_Data_Exception $e) { + } catch (Horde_Exception $e) { if ($data) { $notification->push($e, 'horde.error'); $next_step = $data->cleanup(); diff --git a/nag/data.php b/nag/data.php index e0daa3905..b9222d924 100644 --- a/nag/data.php +++ b/nag/data.php @@ -141,7 +141,7 @@ if (!$error && $import_format) { try { $data = $injector->getInstance('Horde_Core_Factory_Data')->create($import_format, array('cleanup' => '_cleanupData')); $next_step = $data->nextStep($actionID, $param); - } catch (Horde_Data_Exception $e) { + } catch (Horde_Exception $e) { if ($data) { $notification->push($e, 'horde.error'); $next_step = $data->cleanup(); diff --git a/turba/data.php b/turba/data.php index eee4ec084..7e0838f45 100644 --- a/turba/data.php +++ b/turba/data.php @@ -243,7 +243,7 @@ case 'export': /* Create a Turba storage instance. */ try { $driver = $injector->getInstance('Turba_Factory_Driver')->create($source); - } catch (Turba_Exception $e) { + } catch (Horde_Exception $e) { $notification->push($e, 'horde.error'); $error = true; break; @@ -336,7 +336,7 @@ case Horde_Data::IMPORT_FILE: $dest = Horde_Util::getFormData('dest'); try { $driver = $injector->getInstance('Turba_Factory_Driver')->create($dest); - } catch (Turba_Exception $e) { + } catch (Horde_Exception $e) { $notification->push($e, 'horde.error'); $error = true; break; @@ -387,7 +387,7 @@ if (!$error && !empty($import_format)) { } else { $data = $injector->getInstance('Horde_Core_Factory_Data')->create($import_format, array('cleanup' => '_cleanupData')); } - } catch (Turba_Exception $e) { + } catch (Horde_Exception $e) { $notification->push(_("This file format is not supported."), 'horde.error'); $data = null; $next_step = Horde_Data::IMPORT_FILE; @@ -407,7 +407,7 @@ if (!$error && !empty($import_format)) { $notification->push(_("The import can be finished despite the warnings."), 'horde.message'); } } - } catch (Turba_Exception $e) { + } catch (Horde_Data_Exception $e) { $notification->push($e, 'horde.error'); $next_step = $data->cleanup(); } @@ -424,7 +424,7 @@ if (is_array($next_step)) { $dest = $session->get('horde', 'import_data/target'); try { $driver = $injector->getInstance('Turba_Factory_Driver')->create($dest); - } catch (Turba_Exception $e) { + } catch (Horde_Exception $e) { $notification->push($e, 'horde.error'); $driver = null; } -- 2.11.0