Askedio\LaravelRatchet\RatchetServer::onError PHP Method

onError() public method

Perform action on error.
public onError ( Ratchet\ConnectionInterface $conn, Exception $exception ) : [type]
$conn Ratchet\ConnectionInterface [description]
$exception Exception [description]
return [type]
    public function onError(ConnectionInterface $conn, \Exception $exception)
    {
        $message = $exception->getMessage();
        $conn->close();
        $this->console->error(sprintf('Error: %s', $message));
    }