A sentry capture
This commit is contained in:
parent
6776d3c5c2
commit
7deba919b1
|
|
@ -75,6 +75,7 @@ class StartServer extends Command
|
|||
*/
|
||||
public function handle()
|
||||
{
|
||||
try {
|
||||
$this->components->info('Handling websocket server with pid ' . getmypid() . '...');
|
||||
|
||||
// For is_fork() helper
|
||||
|
|
@ -111,6 +112,18 @@ class StartServer extends Command
|
|||
// $this->configurePongTracker();
|
||||
|
||||
$this->startServer();
|
||||
} catch (\Throwable $e) {
|
||||
$this->error('Error starting the WebSocket server: ' . $e->getMessage());
|
||||
|
||||
\Log::error('Error starting the WebSocket server: ', [
|
||||
'exception' => $e,
|
||||
]);
|
||||
|
||||
// if sentry is defined capture exception
|
||||
if (app()->bound('sentry')) {
|
||||
app('sentry')->captureException($e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue