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) {