From 0ddaa6ff75e2b7637772368a9c83027d53765906 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Thu, 14 Jan 2016 01:47:13 +0100 Subject: [PATCH] Handle exceptions in QueueHandler classes --- lib/dbqueuemanager.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/dbqueuemanager.php b/lib/dbqueuemanager.php index 9fb77eed96..3adac08971 100644 --- a/lib/dbqueuemanager.php +++ b/lib/dbqueuemanager.php @@ -91,7 +91,13 @@ class DBQueueManager extends QueueManager $handler = $this->getHandler($qi->transport); if ($handler) { - if ($handler->handle($item)) { + try { + $result = $handler->handle($item) + } catch (Exception $e) { + $result = false; + $this->_log(LOG_ERR, "[{$qi->transport}:$rep] Exception thrown: {$e->getMessage()}"); + } + if ($result) { $this->_log(LOG_INFO, "[{$qi->transport}:$rep] Successfully handled item"); $this->_done($qi); } else { -- 2.39.5