From afdd2e1d49a445f4c528ddb96167e3865a99b27b Mon Sep 17 00:00:00 2001 From: Jakub Trmota Date: Wed, 18 Sep 2024 12:12:38 +0200 Subject: [PATCH] Session: keep exceptions chain on session_start (#240) --- src/Http/Session.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Http/Session.php b/src/Http/Session.php index 81b69029..9b860c68 100644 --- a/src/Http/Session.php +++ b/src/Http/Session.php @@ -100,7 +100,7 @@ private function doStart($mustExists = false): void 'session_start', [['read_and_close' => $this->readAndClose]], function (string $message) use (&$e): void { - $e = new Nette\InvalidStateException($message); + $e = new Nette\InvalidStateException($message, previous: $e); }, ); } catch (\Throwable $e) {