Added try-catch for writemaplist

This commit is contained in:
Max Klaversma 2014-04-27 01:48:54 +02:00 committed by Steffen Schröder
parent 9c4a1c27ea
commit fe0aa832ae

View File

@ -262,11 +262,15 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb
}
$maplist = 'MatchSettings/'.$maplist;
$this->maniaControl->client->saveMatchSettings($maplist);
try {
$this->maniaControl->client->saveMatchSettings($maplist);
$message = 'Maplist $<$fff'.$maplist.'$> written.';
$this->maniaControl->chat->sendSuccess($message, $player);
$this->maniaControl->log($message, true);
$message = 'Maplist $<$fff'.$maplist.'$> written.';
$this->maniaControl->chat->sendSuccess($message, $player);
$this->maniaControl->log($message, true);
} catch(FaultException $e) {
$this->maniaControl->chat->sendError('Cannot write maplist $<$fff'.$maplist.'$>!', $player);
}
}
/**