Kraken\Network\NetworkComponentInterface::handleError PHP Méthode

handleError() public méthode

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.
public handleError ( Kraken\Network\NetworkConnectionInterface $conn, Erro\Error | Exceptio\Exception $ex )
$conn Kraken\Network\NetworkConnectionInterface
$ex Erro\Error | Exceptio\Exception
    public function handleError(NetworkConnectionInterface $conn, $ex);

Usage Example

Exemple #1
0
 /**
  * @override
  * @inheritDoc
  */
 public function handleError(NetworkConnectionInterface $conn, $ex)
 {
     if ($conn->httpHeadersReceived) {
         $this->httpServer->handleError($conn, $ex);
     } else {
         $this->close($conn, 500);
     }
 }
All Usage Examples Of Kraken\Network\NetworkComponentInterface::handleError