From c23f7dd5b97d52e050d1ad7ed9dfa4c95061ec0c Mon Sep 17 00:00:00 2001 From: kremsy Date: Mon, 28 Apr 2014 20:58:21 +0200 Subject: [PATCH] exception todo --- application/core/Players/PlayerActions.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/application/core/Players/PlayerActions.php b/application/core/Players/PlayerActions.php index af9d6319..cef6d7ff 100644 --- a/application/core/Players/PlayerActions.php +++ b/application/core/Players/PlayerActions.php @@ -12,6 +12,7 @@ use ManiaControl\Formatter; use ManiaControl\ManiaControl; use ManiaControl\Manialinks\ManialinkManager; use Maniaplanet\DedicatedServer\Xmlrpc\Exception; +use Maniaplanet\DedicatedServer\Xmlrpc\FaultException; use Maniaplanet\DedicatedServer\Xmlrpc\NotInTeamModeException; use Maniaplanet\DedicatedServer\Xmlrpc\PlayerAlreadyIgnoredException; use Maniaplanet\DedicatedServer\Xmlrpc\PlayerIsNotSpectatorException; @@ -91,7 +92,8 @@ class PlayerActions { try { $this->maniaControl->client->forceSpectator($target->login, self::SPECTATOR_PLAYER); - } catch(Exception $e) { + } catch(FaultException $e) { + //TODO exception 'There are too many players' appeared 28.04.2014, wait for more before add to faultexception $this->maniaControl->chat->sendException($e, $admin->login); return; }