fixed todo
This commit is contained in:
parent
c8cd4c0c38
commit
e6f630788d
@ -525,6 +525,8 @@ class MapManager implements CallbackListener {
|
|||||||
* @param $mapDir
|
* @param $mapDir
|
||||||
* @param $login
|
* @param $login
|
||||||
* @param $update
|
* @param $update
|
||||||
|
* @throws \Exception
|
||||||
|
* @throws \Maniaplanet\DedicatedServer\Xmlrpc\Exception
|
||||||
*/
|
*/
|
||||||
private function processMapFile($file, MXMapInfo $mapInfo, $mapDir, $login, $update) {
|
private function processMapFile($file, MXMapInfo $mapInfo, $mapDir, $login, $update) {
|
||||||
//Check if map is already on the server
|
//Check if map is already on the server
|
||||||
@ -563,10 +565,12 @@ class MapManager implements CallbackListener {
|
|||||||
try {
|
try {
|
||||||
$this->maniaControl->client->writeFileFromString($mapFileName, $file);
|
$this->maniaControl->client->writeFileFromString($mapFileName, $file);
|
||||||
} catch(Exception $e) {
|
} catch(Exception $e) {
|
||||||
// TODO: add check for error message - throw other stuff like connection errors
|
if ($e->getMessage() == 'transport error - request too large!') {
|
||||||
$this->maniaControl->chat->sendError("Map is too big for a remote save.", $login);
|
$this->maniaControl->chat->sendError("Map is too big for a remote save.", $login);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for valid map
|
// Check for valid map
|
||||||
|
Loading…
Reference in New Issue
Block a user