MDL-28179 make failed event hander error message much more useful.

This commit is contained in:
Tim Hunt
2011-07-06 01:49:02 +02:00
committed by Eloy Lafuente (stronk7)
parent 757ca142ca
commit 6ff0bacee1
+5 -1
View File
@@ -345,7 +345,11 @@ function events_process_queued_handler($qhandler) {
} catch (Exception $e) {
// the problem here is that we do not want one broken handler to stop all others,
// cron handlers are very tricky because the needed data might have been deleted before the cron execution
$errormessage = "Handler function of component $handler->component: $handler->handlerfunction threw exception :".$e->getMessage();
$errormessage = "Handler function of component $handler->component: $handler->handlerfunction threw exception :" .
$e->getMessage() . "\n" . format_backtrace($e->getTrace(), true);
if (!empty($e->debuginfo)) {
$errormessage .= $e->debuginfo;
}
}
//dispatching failed