replaced debug notices by chat messages

This commit is contained in:
Steffen Schröder
2014-04-14 13:19:05 +02:00
parent 17b7e4249f
commit 04d47fb61f
3 changed files with 17 additions and 45 deletions

View File

@ -651,8 +651,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
$this->maniaControl->client->forceSpectator($adminLogin, PlayerActions::SPECTATOR_BUT_KEEP_SELECTABLE);
$this->maniaControl->client->forceSpectatorTarget($adminLogin, $targetLogin, 1);
} catch(Exception $e) {
$this->maniaControl->errorHandler->triggerDebugNotice("PlayerList Debug Line 653: " . $e->getMessage());
// TODO: only possible valid exception should be "wrong login" - throw others (like connection error)
$this->maniaControl->chat->sendException($e, $adminLogin);
}
break;
case self::ACTION_OPEN_PLAYER_DETAILED:
@ -724,10 +723,8 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
$this->maniaControl->client->forceSpectator($target->login, PlayerActions::SPECTATOR_BUT_KEEP_SELECTABLE);
$this->maniaControl->client->spectatorReleasePlayerSlot($target->login);
} catch(Exception $e) {
if ($e->getMessage() != 'Login unknown.') {
//do nothing
// TODO: only possible valid exception should be "wrong login" - throw others (like connection error)
$this->maniaControl->errorHandler->triggerDebugNotice("PlayerList Debug Line 727: " . $e->getMessage());
if ($e->getMessage() != 'Login unknown.' && $e->getMessage() != 'The player is not a spectator') {
$this->maniaControl->chat->sendException($e);
}
}
});
@ -785,4 +782,4 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
$this->showPlayerList($player);
}
}
}
}