From: Jan Schneider Date: Fri, 12 Feb 2010 21:48:16 +0000 (+0100) Subject: We don't want the backtrace in notifications, use getMessage(). X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=0e1f67a2365ac4fbe0a6392c0a979d84b7fa79a1;p=horde.git We don't want the backtrace in notifications, use getMessage(). --- diff --git a/framework/Notification/lib/Horde/Notification/Event.php b/framework/Notification/lib/Horde/Notification/Event.php index b75664de9..eb09147b1 100644 --- a/framework/Notification/lib/Horde/Notification/Event.php +++ b/framework/Notification/lib/Horde/Notification/Event.php @@ -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';