updated dedicated-server-api exception usages
This commit is contained in:
@ -17,14 +17,14 @@ use FML\Script\Features\Paging;
|
||||
use ManiaControl\Callbacks\CallbackListener;
|
||||
use ManiaControl\Callbacks\CallbackManager;
|
||||
use ManiaControl\Callbacks\Callbacks;
|
||||
use ManiaControl\Utils\ColorUtil;
|
||||
use ManiaControl\Utils\Formatter;
|
||||
use ManiaControl\ManiaControl;
|
||||
use ManiaControl\Manialinks\IconManager;
|
||||
use ManiaControl\Manialinks\ManialinkManager;
|
||||
use ManiaControl\Manialinks\ManialinkPageAnswerListener;
|
||||
use ManiaControl\Players\Player;
|
||||
use Maniaplanet\DedicatedServer\Xmlrpc\MapNotFoundException;
|
||||
use ManiaControl\Utils\ColorUtil;
|
||||
use ManiaControl\Utils\Formatter;
|
||||
use Maniaplanet\DedicatedServer\Xmlrpc\NotInListException;
|
||||
use MCTeam\CustomVotesPlugin;
|
||||
use MCTeam\KarmaPlugin;
|
||||
|
||||
@ -613,7 +613,7 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
|
||||
$this->maniaControl->mapManager->mapQueue->dontQueueNextMapChange();
|
||||
try {
|
||||
$this->maniaControl->client->jumpToMapIdent($mapUid);
|
||||
} catch (MapNotFoundException $e) {
|
||||
} catch (NotInListException $e) {
|
||||
$this->maniaControl->chat->sendError("Error on Jumping to Map Ident!");
|
||||
break;
|
||||
}
|
||||
@ -645,7 +645,7 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
|
||||
|
||||
try {
|
||||
$self->maniaControl->client->JumpToMapIdent($map->uid);
|
||||
} catch (MapNotFoundException $e) {
|
||||
} catch (NotInListException $e) {
|
||||
}
|
||||
});
|
||||
break;
|
||||
|
@ -13,11 +13,11 @@ use ManiaControl\ManiaExchange\ManiaExchangeManager;
|
||||
use ManiaControl\ManiaExchange\MXMapInfo;
|
||||
use ManiaControl\Players\Player;
|
||||
use Maniaplanet\DedicatedServer\InvalidArgumentException;
|
||||
use Maniaplanet\DedicatedServer\Xmlrpc\CouldNotWritePlaylistFileException;
|
||||
use Maniaplanet\DedicatedServer\Xmlrpc\Exception;
|
||||
use Maniaplanet\DedicatedServer\Xmlrpc\MapNotCompatibleOrCompleteException;
|
||||
use Maniaplanet\DedicatedServer\Xmlrpc\MapNotInCurrentSelectionException;
|
||||
use Maniaplanet\DedicatedServer\Xmlrpc\StartIndexOutOfBoundException;
|
||||
use Maniaplanet\DedicatedServer\Xmlrpc\FileException;
|
||||
use Maniaplanet\DedicatedServer\Xmlrpc\IndexOutOfBoundException;
|
||||
use Maniaplanet\DedicatedServer\Xmlrpc\InvalidMapException;
|
||||
use Maniaplanet\DedicatedServer\Xmlrpc\NotInListException;
|
||||
|
||||
// TODO: adding of local maps
|
||||
|
||||
@ -209,7 +209,7 @@ class MapManager implements CallbackListener {
|
||||
// Remove map
|
||||
try {
|
||||
$this->maniaControl->client->removeMap($map->fileName);
|
||||
} catch (MapNotInCurrentSelectionException $e) {
|
||||
} catch (NotInListException $e) {
|
||||
}
|
||||
|
||||
unset($this->maps[$uid]);
|
||||
@ -322,7 +322,7 @@ class MapManager implements CallbackListener {
|
||||
// Check for valid map
|
||||
try {
|
||||
$this->maniaControl->client->checkMapForCurrentServerParams($relativeMapFileName);
|
||||
} catch (MapNotCompatibleOrCompleteException $e) {
|
||||
} catch (InvalidMapException $e) {
|
||||
trigger_error("Couldn't check if map is valid ('{$relativeMapFileName}'). " . $e->getMessage());
|
||||
$this->maniaControl->chat->sendError('Wrong MapType or not validated!', $login);
|
||||
return;
|
||||
@ -394,7 +394,7 @@ class MapManager implements CallbackListener {
|
||||
|
||||
$i += 150;
|
||||
}
|
||||
} catch (StartIndexOutOfBoundException $e) {
|
||||
} catch (IndexOutOfBoundException $e) {
|
||||
}
|
||||
|
||||
// restore Sorted MapList
|
||||
@ -408,7 +408,7 @@ class MapManager implements CallbackListener {
|
||||
$matchSettingsFileName = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_MAPLIST_FILE);
|
||||
try {
|
||||
$this->maniaControl->client->saveMatchSettings($matchSettingsFileName);
|
||||
} catch (CouldNotWritePlaylistFileException $e) {
|
||||
} catch (FileException $e) {
|
||||
$this->maniaControl->log("Unable to write the playlist file, please checkout your MX-Folders File permissions!");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user