public function process() { try { while ($this->host->game_state < self::IN_GAME) { parent::select(); parent::checkTimer(); $this->host->accept(); $this->host->select(); $this->host->checkTimer(); } for (;;) { $this->host->select(); $this->host->checkTimer(); } } catch (UndefinedVariable $e) { $this->host->setFatalError($e); //unset the host object will trigger the onSummary() method. //which will save the fatal error trace back as well. unset($this->host); exit; } }