updated dedicated-server-api exception usages

This commit is contained in:
Steffen Schröder
2014-05-13 17:59:37 +02:00
parent d16e89d13d
commit 16d2571485
22 changed files with 106 additions and 111 deletions

View File

@ -6,7 +6,7 @@ use ManiaControl\Callbacks\CallbackListener;
use ManiaControl\Callbacks\CallbackManager;
use ManiaControl\Callbacks\Callbacks;
use ManiaControl\ManiaControl;
use Maniaplanet\DedicatedServer\Xmlrpc\NotInScriptModeException;
use Maniaplanet\DedicatedServer\Xmlrpc\GameModeException;
/**
* Class managing Rankings
@ -42,7 +42,7 @@ class RankingManager implements CallbackListener {
public function onInit() {
try {
$this->maniaControl->client->triggerModeScriptEvent('LibXmlRpc_GetRankings', '');
} catch (NotInScriptModeException $e) {
} catch (GameModeException $e) {
}
}

View File

@ -13,7 +13,7 @@ use ManiaControl\Commands\CommandListener;
use ManiaControl\ManiaControl;
use ManiaControl\Manialinks\ManialinkPageAnswerListener;
use ManiaControl\Players\Player;
use Maniaplanet\DedicatedServer\Xmlrpc\NotInScriptModeException;
use Maniaplanet\DedicatedServer\Xmlrpc\GameModeException;
/**
* Class offering various Commands related to the Dedicated Server
@ -106,7 +106,7 @@ class ServerCommands implements CallbackListener, CommandListener, ManialinkPage
//Check if Pause exists in current GameMode
try {
$scriptInfos = $this->maniaControl->client->getModeScriptInfo();
} catch (NotInScriptModeException $e) {
} catch (GameModeException $e) {
return;
}
$pauseExists = false;
@ -161,7 +161,7 @@ class ServerCommands implements CallbackListener, CommandListener, ManialinkPage
try {
$this->maniaControl->client->triggerModeScriptEvent('WarmUp_Extend', '10');
} catch (NotInScriptModeException $e) {
} catch (GameModeException $e) {
return;
}
@ -182,7 +182,7 @@ class ServerCommands implements CallbackListener, CommandListener, ManialinkPage
try {
$this->maniaControl->client->triggerModeScriptEvent('WarmUp_Stop', '');
} catch (NotInScriptModeException $e) {
} catch (GameModeException $e) {
return;
}
@ -202,7 +202,7 @@ class ServerCommands implements CallbackListener, CommandListener, ManialinkPage
}
try {
$this->maniaControl->client->sendModeScriptCommands(array('Command_ForceWarmUp' => true));
} catch (NotInScriptModeException $e) {
} catch (GameModeException $e) {
return;
}

View File

@ -6,7 +6,7 @@ use ManiaControl\Callbacks\TimerListener;
use ManiaControl\ManiaControl;
use ManiaControl\Plugins\Plugin;
use ManiaControl\Utils\Formatter;
use Maniaplanet\DedicatedServer\Xmlrpc\NotInScriptModeException;
use Maniaplanet\DedicatedServer\Xmlrpc\GameModeException;
/**
* Class reporting ManiaControl Usage for the Server
@ -69,7 +69,7 @@ class UsageReporter implements TimerListener {
try {
$scriptName = $this->maniaControl->client->getScriptName();
$properties['ScriptName'] = $scriptName['CurrentValue'];
} catch (NotInScriptModeException $e) {
} catch (GameModeException $e) {
$properties['ScriptName'] = '';
}