catch errors
authorChuck Hagenbuch <chuck@horde.org>
Mon, 10 Aug 2009 04:10:01 +0000 (00:10 -0400)
committerChuck Hagenbuch <chuck@horde.org>
Mon, 10 Aug 2009 04:10:01 +0000 (00:10 -0400)
ansel/lib/View/Gallery.php

index 0b0ef84..c798af8 100644 (file)
@@ -81,6 +81,9 @@ class Ansel_View_Gallery extends Ansel_View_Base
         } else {
             $this->gallery = $this->getGallery();
         }
+        if (is_a($this->gallery, 'PEAR_Error')) {
+            throw new Horde_Exception($this->gallery);
+        }
 
         // Check user age
         if (!$this->gallery->isOldEnough()) {