I added better error display

This commit is contained in:
a6a2f5842 2025-06-12 16:16:07 +02:00
parent 556a5aba2e
commit 4f0dd41028
1 changed files with 34 additions and 26 deletions

View File

@ -41,6 +41,7 @@ class Handler implements MessageComponentInterface
public function onOpen(ConnectionInterface $connection)
{
try{
if (! $this->connectionCanBeMade($connection)) {
return $connection->close();
}
@ -70,6 +71,13 @@ class Handler implements MessageComponentInterface
$connection->socketId
);
}
}catch (UnknownAppKey $e) {
Log::channel('websocket')->error('Root level error: '. $e->getMessage(), [
'file' => $e->getFile(),
'line' => $e->getLine(),
'trace' => $e->getTraceAsString(),
]);
}
}
public function onMessage(