We don't want the backtrace in notifications, use getMessage().
authorJan Schneider <jan@horde.org>
Fri, 12 Feb 2010 21:48:16 +0000 (22:48 +0100)
committerJan Schneider <jan@horde.org>
Mon, 15 Feb 2010 17:03:58 +0000 (18:03 +0100)
framework/Notification/lib/Horde/Notification/Event.php

index b75664d..eb09147 100644 (file)
@@ -70,8 +70,14 @@ class Horde_Notification_Event
             if (is_null($type)) {
                 $type = 'horde.error';
             }
+        } elseif ($data instanceof Exception) {
+            // Exception
+            $this->message = $data->getMessage();
+            if (is_null($type)) {
+                $type = 'horde.error';
+            }
         } else {
-            // String or Exception
+            // String or object
             $this->message = strval($data);
             if (is_null($type)) {
                 $type = is_string($data) ? 'horde.message' : 'horde.error';