From b0898ada2942e4207b0fb6dfacb8ffbdd3c6945e Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Fri, 30 Dec 2022 22:25:19 -0500 Subject: [PATCH] Add previous exception to unexpected worker exception logging --- src/Core/Worker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Core/Worker.php b/src/Core/Worker.php index cbe6645294..57895ab173 100644 --- a/src/Core/Worker.php +++ b/src/Core/Worker.php @@ -574,7 +574,7 @@ class Worker // No need to defer a worker queue entry if the arguments are invalid Logger::notice('Wrong worker arguments', ['class' => $funcname, 'argv' => $argv, 'queue' => $queue, 'message' => $e->getMessage()]); } catch (\Throwable $e) { - Logger::error('Uncaught exception in worker execution', ['class' => get_class($e), 'message' => $e->getMessage(), 'code' => $e->getCode(), 'file' => $e->getFile() . ':' . $e->getLine(), 'trace' => $e->getTraceAsString()]); + Logger::error('Uncaught exception in worker execution', ['class' => get_class($e), 'message' => $e->getMessage(), 'code' => $e->getCode(), 'file' => $e->getFile() . ':' . $e->getLine(), 'trace' => $e->getTraceAsString(), 'previous' => $e->getPrevious()]); Worker::defer(); } } else { -- 2.39.5