improve logging

This commit is contained in:
Beu
2025-06-22 17:54:17 +02:00
parent 9efa66ac5d
commit ebecb7da73

View File

@ -1156,7 +1156,7 @@ class MatchManagerCore implements CallbackListener, CommandListener, TimerListen
try {
$mapInfo = $this->maniaControl->getMapManager()->initializeMap($this->maniaControl->getClient()->getMapInfo($map));
} catch (Exception $e) {
throw new \Exception("Error with the map " . $map . ": " . $e->getMessage());
throw new \Exception('Error with the Map to play "' . $map . '": ' . $e->getMessage());
}
}
@ -1172,7 +1172,11 @@ class MatchManagerCore implements CallbackListener, CommandListener, TimerListen
// Remove all maps
foreach ($this->maniaControl->getMapManager()->getMaps() as $map) {
try {
$this->maniaControl->getClient()->removeMap($map->fileName);
} catch (Exception $e) {
throw new \Exception('Error when removing map "' . $map->getEscapedName() . '" from the playlist: ' . $e->getMessage());
}
}
$this->maps = $maps;