public function handleError($socket, $ex) { try { $this->component->handleError($socket->conn, $ex); } catch (Error $ex) { $this->close($socket); } catch (Exception $ex) { $this->close($socket); } }