aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/notification.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-01-28 18:01:31 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-01-28 18:01:31 +0000
commit59df3e76742df11d8e0d94d42f2e87bddc50655c (patch)
treeb9eb36e971c77b162ced6073dcaabd921bef51df /engine/lib/notification.php
parent2fb6d320e311148d590626bbdb714535bb1a481c (diff)
downloadelgg-59df3e76742df11d8e0d94d42f2e87bddc50655c.tar.gz
elgg-59df3e76742df11d8e0d94d42f2e87bddc50655c.tar.bz2
notify_user now traps exceptions and logs them.
git-svn-id: https://code.elgg.org/elgg/trunk@2625 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/notification.php')
-rw-r--r--engine/lib/notification.php20
1 files changed, 12 insertions, 8 deletions
diff --git a/engine/lib/notification.php b/engine/lib/notification.php
index 2b847a5fa..de3c64bef 100644
--- a/engine/lib/notification.php
+++ b/engine/lib/notification.php
@@ -112,14 +112,18 @@
if ($CONFIG->debug)
error_log("Sending message to $guid using $method");
- // Trigger handler and retrieve result.
- $result[$guid][$method] = $handler(
- $from ? get_entity($from) : NULL, // From entity
- get_entity($guid), // To entity
- $subject, // The subject
- $message, // Message
- $params // Params
- );
+ // Trigger handler and retrieve result.
+ try {
+ $result[$guid][$method] = $handler(
+ $from ? get_entity($from) : NULL, // From entity
+ get_entity($guid), // To entity
+ $subject, // The subject
+ $message, // Message
+ $params // Params
+ );
+ } catch (Exception $e) {
+ error_log($e->getMessage());
+ }
}
}