Skip to content

Commit

Permalink
Fix Worker not catching runtime Throwable exceptions in perform since…
Browse files Browse the repository at this point in the history
… PHP 7
  • Loading branch information
Scott Jackson committed Oct 18, 2017
1 parent 347a86c commit 5dc0cb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Resque/Worker.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5dc0cb2

Please sign in to comment.