Catch correct exception.
authorJan Schneider <jan@horde.org>
Thu, 27 Jan 2011 09:46:16 +0000 (10:46 +0100)
committerJan Schneider <jan@horde.org>
Thu, 27 Jan 2011 09:49:45 +0000 (10:49 +0100)
kronolith/data.php
mnemo/data.php
nag/data.php
turba/data.php

index 2e70e26..c72ce36 100644 (file)
@@ -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();
index 5dd29e8..0dccaca 100644 (file)
@@ -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();
index e0daa39..b9222d9 100644 (file)
@@ -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();
index eee4ec0..7e0838f 100644 (file)
@@ -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;
     }