Catch exceptions.
authorJan Schneider <jan@horde.org>
Mon, 8 Feb 2010 22:39:37 +0000 (23:39 +0100)
committerJan Schneider <jan@horde.org>
Mon, 8 Feb 2010 22:39:37 +0000 (23:39 +0100)
horde/services/ajax.php

index 9d469ea..c17aba8 100644 (file)
@@ -53,7 +53,12 @@ try {
 ob_start();
 
 $ajax = Horde_Ajax::getInstance($app, $action);
-$result = $ajax->doAction();
+try {
+    $result = $ajax->doAction();
+} catch (Exception $e) {
+    $notification->push($e->getMessage(), 'horde.error');
+    $result = null;
+}
 
 // Clear the output buffer that we started above, and log any unexpected
 // output at a DEBUG level.