From 0e1f67a2365ac4fbe0a6392c0a979d84b7fa79a1 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Fri, 12 Feb 2010 22:48:16 +0100 Subject: [PATCH] We don't want the backtrace in notifications, use getMessage(). --- framework/Notification/lib/Horde/Notification/Event.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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'; -- 2.11.0