Skip to content

Commit be414e4

Browse files
authored
Merge pull request #56 from ppavlovic/master
Changed \Exception to \Throwable to catch \Error (TypeError, etc..)
2 parents 54d4100 + a9a14e5 commit be414e4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/Tasker2/Runner.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public function execute()
149149
$task->execute();
150150
$this->taskerExecution->setOutput(ob_get_flush());
151151
$this->logNewRelicEnd();
152-
} catch (\Exception $e) {
152+
} catch (\Throwable $e) {
153153
$this->taskerExecution->setOutput(ob_get_flush());
154154
$this->handleException($e);
155155
$this->clearProfilerData();
@@ -268,7 +268,7 @@ private function logNewRelicEnd()
268268
return $this;
269269
}
270270

271-
private function logNewRelicFailed(\Exception $exception)
271+
private function logNewRelicFailed(\Throwable $exception)
272272
{
273273
if ($this->newRelic !== null) {
274274
$this->newRelic->failedTransaction($exception);
@@ -291,7 +291,7 @@ private function checkMaxRetryAttempts()
291291
return $this;
292292
}
293293

294-
public function handleException(\Exception $e)
294+
public function handleException(\Throwable $e)
295295
{
296296
if (!$this->taskDomain instanceof \G4\Tasker\Model\Domain\Task) {
297297
return $this;

0 commit comments

Comments
 (0)