exception fix

This commit is contained in:
kremsy 2014-04-20 15:29:27 +02:00 committed by Steffen Schröder
parent 3b5f7bd756
commit 154ed55908

View File

@ -6,6 +6,7 @@ use ManiaControl\Callbacks\CallbackListener;
use ManiaControl\Callbacks\CallbackManager; use ManiaControl\Callbacks\CallbackManager;
use ManiaControl\ManiaControl; use ManiaControl\ManiaControl;
use Maniaplanet\DedicatedServer\Xmlrpc\Exception; use Maniaplanet\DedicatedServer\Xmlrpc\Exception;
use Maniaplanet\DedicatedServer\Xmlrpc\NotInScriptModeException;
/** /**
* Class managing Rankings * Class managing Rankings
@ -50,12 +51,7 @@ class RankingManager implements CallbackListener {
public function onInit() { public function onInit() {
try { try {
$this->maniaControl->client->triggerModeScriptEvent('LibXmlRpc_GetRankings', ''); $this->maniaControl->client->triggerModeScriptEvent('LibXmlRpc_GetRankings', '');
} catch(Exception $e) { } catch(NotInScriptModeException $e) {
if ($e->getMessage() == 'Not in script mode.') {
// do nothing
return;
}
throw $e;
} }
} }