From 5dc0cb2cacbd646bff717c50ac7ea62996141018 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Wed, 18 Oct 2017 16:52:50 -0700 Subject: [PATCH] Fix Worker not catching runtime Throwable exceptions in perform since PHP 7 --- lib/Resque/Worker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Resque/Worker.php b/lib/Resque/Worker.php index 65173bee..a57e57f0 100644 --- a/lib/Resque/Worker.php +++ b/lib/Resque/Worker.php @@ -260,7 +260,7 @@ public function perform(Resque_Job $job) Resque_Event::trigger('afterFork', $job); $job->perform(); } - catch(Exception $e) { + catch(Throwable $e) { $this->logger->log(Psr\Log\LogLevel::CRITICAL, '{job} has failed {stack}', array('job' => $job, 'stack' => $e->getMessage())); $job->fail($e); return;