Need to catch Horde_Block_Exception here so we return to the proper application scope
authorMichael J. Rubinsky <mrubinsk@horde.org>
Mon, 19 Jul 2010 14:22:17 +0000 (10:22 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Mon, 19 Jul 2010 14:22:59 +0000 (10:22 -0400)
framework/Block/lib/Horde/Block.php

index d960286..f0fb113 100644 (file)
@@ -132,8 +132,11 @@ class Horde_Block
             return $e->getMessage();
         }
 
-        $title = $this->_title();
-
+        try {
+            $title = $this->_title();
+        } catch (Horde_Block_Exception $e) {
+            $title = $e->getMessage();
+        }
         /* If we changed application context in the course of this
          * call, undo that change now. */
         if ($app_pushed) {
@@ -172,7 +175,11 @@ class Horde_Block
             return $e->getMessage();
         }
 
-        $content = $this->_content();
+        try {
+            $content = $this->_content();
+        } catch (Horde_Block_Exception $e) {
+            $content = $e->getMessage();
+        }
 
         /* If we changed application context in the course of this
          * call, undo that change now. */