Handle exceptions in QueueHandler classes

This commit is contained in:
Mikael Nordfeldth 2016-01-14 01:47:13 +01:00
parent 0482b7de8e
commit 0ddaa6ff75

View File

@ -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 {