As long as API methods return PEAR_Errors, throw them as exceptions.
authorJan Schneider <jan@horde.org>
Tue, 14 Jul 2009 11:44:25 +0000 (13:44 +0200)
committerJan Schneider <jan@horde.org>
Tue, 14 Jul 2009 11:44:25 +0000 (13:44 +0200)
framework/Core/lib/Horde/Registry.php

index 34caabc..b73bf9a 100644 (file)
@@ -604,6 +604,10 @@ class Horde_Registry
             $this->popApp();
         }
 
+        if (is_a($res, 'PEAR_Error')) {
+            throw new Horde_Exception($res);
+        }
+
         return $res;
     }