diff --git a/src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php b/src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php --- a/src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php +++ b/src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php @@ -134,6 +134,7 @@ $did_succeed = false; $worker = null; + $caught = null; try { $worker = $this->getWorkerInstance(); $worker->setCurrentWorkerTask($this); @@ -180,6 +181,12 @@ $result = $this; } catch (Exception $ex) { + $caught = $ex; + } catch (Throwable $ex) { + $caught = $ex; + } + + if ($caught) { $this->setExecutionException($ex); $this->setFailureCount($this->getFailureCount() + 1); $this->setFailureTime(time()); diff --git a/src/infrastructure/daemon/workers/storage/PhabricatorWorkerTask.php b/src/infrastructure/daemon/workers/storage/PhabricatorWorkerTask.php --- a/src/infrastructure/daemon/workers/storage/PhabricatorWorkerTask.php +++ b/src/infrastructure/daemon/workers/storage/PhabricatorWorkerTask.php @@ -34,7 +34,7 @@ ) + parent::getConfiguration(); } - final public function setExecutionException(Exception $execution_exception) { + final public function setExecutionException($execution_exception) { $this->executionException = $execution_exception; return $this; }