From ebecb7da734d8d87cb99666689df14b39d54f68e Mon Sep 17 00:00:00 2001 From: beu Date: Sun, 22 Jun 2025 17:54:17 +0200 Subject: [PATCH] improve logging --- MatchManagerSuite/MatchManagerCore.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/MatchManagerSuite/MatchManagerCore.php b/MatchManagerSuite/MatchManagerCore.php index 1d1ddee..30b74da 100644 --- a/MatchManagerSuite/MatchManagerCore.php +++ b/MatchManagerSuite/MatchManagerCore.php @@ -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) { - $this->maniaControl->getClient()->removeMap($map->fileName); + 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;