/** * If there is an error with one of the sockets, or somewhere in the application where an Exception is thrown, * the Exception is sent back down the stack, handled by the Server and bubbled back up the application through this method * @param ConnectionInterface $conn * @param \Exception $e * @throws \Exception */ public function onError(ConnectionInterface $conn, \Exception $e) { if ($e instanceof Exception) { //@TODO handle exception here error_log($e->getMessage()); } else { $wrapped = $this->connections->offsetGet($conn); $this->wrapped->onError($wrapped, $e); } }
/** * {@inheritdoc} */ public function onError(ConnectionInterface $conn, \Exception $e) { if ($conn->WebSocket->established && $this->connections->contains($conn)) { $this->component->onError($this->connections[$conn], $e); } else { $conn->close(); } }
/** * {@inheritdoc} */ public function onError(ConnectionInterface $conn, \Exception $e) { if ($conn->WebSocket->established) { $this->_decorating->onError($this->connections[$conn], $e); } else { $conn->close(); } }
/** * {@inheritdoc} */ function onError(ConnectionInterface $conn, \Exception $e) { return $this->_component->onError($conn, $e); }
/** * {@inheritdoc} */ public function onError(ConnectionInterface $conn, \Exception $e) { return $this->_app->onError($conn, $e); }
/** * An error has occurred, let the listening application know * @param \Exception $e * @param \React\Socket\ConnectionInterface $conn */ public function handleError(\Exception $e, $conn) { $this->app->onError($conn->decor, $e); }
/** * @param ConnectionInterface $connection * @param \Exception $e * * @return mixed */ public function onError(ConnectionInterface $connection, \Exception $e) { return $this->decorated->onError($connection, $e); }
/** * {@inheritdoc} */ function onError(ConnectionInterface $conn, \Exception $e) { if (!$this->isBlocked($conn->remoteAddress)) { $this->_decorating->onError($conn, $e); } }