exception fixes
This commit is contained in:
parent
696505769d
commit
3f7da59ae2
@ -15,7 +15,7 @@ use ManiaControl\Callbacks\CallbackListener;
|
||||
use ManiaControl\Callbacks\CallbackManager;
|
||||
use ManiaControl\ManiaControl;
|
||||
use ManiaControl\Players\Player;
|
||||
use Maniaplanet\DedicatedServer\Xmlrpc\LadderModeUnknownException;
|
||||
use Maniaplanet\DedicatedServer\Xmlrpc\ServerOptionsException;
|
||||
|
||||
/**
|
||||
* Class offering a Configurator for Server Settings
|
||||
@ -330,8 +330,8 @@ class ServerSettings implements ConfiguratorMenu, CallbackListener {
|
||||
|
||||
try {
|
||||
$this->maniaControl->client->setServerOptions($newSettings);
|
||||
} catch (LadderModeUnknownException $e) {
|
||||
$this->maniaControl->chat->sendError("Unknown Ladder-Mode");
|
||||
} catch (ServerOptionsException $e) {
|
||||
$this->maniaControl->chat->sendError($e->getMessage());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -13,6 +13,7 @@ class FaultException extends Exception
|
||||
{
|
||||
switch($faultString)
|
||||
{
|
||||
case 'Login or Uid unknown.':
|
||||
case 'Login unknown.':
|
||||
return new LoginUnknownException($faultString, $faultCode);
|
||||
case 'Unable to write the playlist file.':
|
||||
@ -38,7 +39,10 @@ class FaultException extends Exception
|
||||
case 'Map not complete.':
|
||||
return new MapNotCompatibleOrCompleteException($faultString, $faultCode);
|
||||
case 'Ladder mode unknown.':
|
||||
return new LadderModeUnknownException($faultString, $faultCode);
|
||||
case 'You cannot change the max players count: AllowSpectatorRelays is activated.':
|
||||
return new ServerOptionsException($faultString, $faultCode);
|
||||
case 'the next map must be different from the current one.':
|
||||
return new NextMapException($faultString, $faultCode);
|
||||
}
|
||||
|
||||
return new self($faultString, $faultCode);
|
||||
@ -54,6 +58,7 @@ class PlayerIsNotSpectatorException extends FaultException {}
|
||||
class NotInTeamModeException extends FaultException {}
|
||||
class MapNotInCurrentSelectionException extends FaultException{}
|
||||
class MapNotCompatibleOrCompleteException extends FaultException{}
|
||||
class LadderModeUnknownException extends FaultException{}
|
||||
class PlayerAlreadyIgnoredException extends FaultException{}
|
||||
class PlayerNotIgnoredException extends FaultException{}
|
||||
class ServerOptionsException extends FaultException{}
|
||||
class NextMapException extends FaultException{}
|
@ -25,6 +25,7 @@ use ManiaControl\Manialinks\ManialinkManager;
|
||||
use ManiaControl\Manialinks\ManialinkPageAnswerListener;
|
||||
use ManiaControl\Players\Player;
|
||||
use Maniaplanet\DedicatedServer\Xmlrpc\Exception;
|
||||
use Maniaplanet\DedicatedServer\Xmlrpc\NextMapException;
|
||||
use MCTeam\CustomVotesPlugin;
|
||||
use MCTeam\KarmaPlugin;
|
||||
|
||||
@ -633,11 +634,7 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
|
||||
try {
|
||||
$index = $self->maniaControl->mapManager->getMapIndex($map);
|
||||
$self->maniaControl->client->jumpToMapIndex($index);
|
||||
} catch (Exception $e) {
|
||||
// TODO temp added 19.04.2014
|
||||
$self->maniaControl->errorHandler->triggerDebugNotice("Exception line 557 MapList.php" . $e->getMessage());
|
||||
|
||||
$self->maniaControl->chat->sendError("Error while Switching Map");
|
||||
} catch (NextMapException $e) {
|
||||
}
|
||||
});
|
||||
break;
|
||||
|
@ -13,6 +13,7 @@ use ManiaControl\ManiaControl;
|
||||
use ManiaControl\Manialinks\ManialinkManager;
|
||||
use Maniaplanet\DedicatedServer\Xmlrpc\Exception;
|
||||
use Maniaplanet\DedicatedServer\Xmlrpc\FaultException;
|
||||
use Maniaplanet\DedicatedServer\Xmlrpc\LoginUnknownException;
|
||||
use Maniaplanet\DedicatedServer\Xmlrpc\NotInTeamModeException;
|
||||
use Maniaplanet\DedicatedServer\Xmlrpc\PlayerAlreadyIgnoredException;
|
||||
use Maniaplanet\DedicatedServer\Xmlrpc\PlayerIsNotSpectatorException;
|
||||
@ -368,7 +369,7 @@ class PlayerActions {
|
||||
} else {
|
||||
$this->maniaControl->client->kick($target->login, $message);
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
} catch (LoginUnknownException $e) {
|
||||
$this->maniaControl->chat->sendException($e, $admin->login);
|
||||
return;
|
||||
}
|
||||
|
@ -1 +0,0 @@
|
||||
<?php unlink(__FILE__);
|
@ -1 +0,0 @@
|
||||
<?php unlink(__FILE__);
|
@ -1,2 +0,0 @@
|
||||
<?php
|
||||
unlink(__FILE__);
|
@ -1 +0,0 @@
|
||||
<?php unlink(__FILE__);
|
@ -1 +0,0 @@
|
||||
<?php unlink(__FILE__);
|
@ -1 +0,0 @@
|
||||
<?php unlink(__FILE__);
|
@ -1 +0,0 @@
|
||||
<?php unlink(__FILE__);
|
@ -1 +0,0 @@
|
||||
<?php unlink(__FILE__);
|
@ -1,2 +0,0 @@
|
||||
<?php
|
||||
unlink(__FILE__);
|
@ -1 +0,0 @@
|
||||
<?php unlink(__FILE__);
|
@ -1 +0,0 @@
|
||||
<?php unlink(__FILE__);
|
@ -1 +0,0 @@
|
||||
<?php unlink(__FILE__);
|
@ -1 +0,0 @@
|
||||
<?php unlink(__FILE__);
|
@ -1 +0,0 @@
|
||||
<?php unlink(__FILE__);
|
@ -1 +0,0 @@
|
||||
<?php unlink(__FILE__);
|
@ -1 +0,0 @@
|
||||
<?php unlink(__FILE__);
|
@ -1 +0,0 @@
|
||||
<?php unlink(__FILE__);
|
@ -1 +0,0 @@
|
||||
<?php unlink(__FILE__);
|
@ -1 +0,0 @@
|
||||
<?php unlink(__FILE__);
|
@ -1 +0,0 @@
|
||||
<?php unlink(__FILE__);
|
@ -1 +0,0 @@
|
||||
<?php unlink(__FILE__);
|
Loading…
Reference in New Issue
Block a user