/** * @param ConnectionInterface $conn * @param \Exception $e */ public function onError(ConnectionInterface $conn, \Exception $e) { $event = new ClientErrorEvent($conn, ClientEvent::ERROR); $event->setException($e); $this->eventDispatcher->dispatch(Events::CLIENT_ERROR, $event); }