improve logging
This commit is contained in:
		| @@ -1156,7 +1156,7 @@ class MatchManagerCore implements CallbackListener, CommandListener, TimerListen | |||||||
| 					try { | 					try { | ||||||
| 						$mapInfo = $this->maniaControl->getMapManager()->initializeMap($this->maniaControl->getClient()->getMapInfo($map)); | 						$mapInfo = $this->maniaControl->getMapManager()->initializeMap($this->maniaControl->getClient()->getMapInfo($map)); | ||||||
| 					} catch (Exception $e) { | 					} 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 | 				// Remove all maps | ||||||
| 				foreach ($this->maniaControl->getMapManager()->getMaps() as $map) { | 				foreach ($this->maniaControl->getMapManager()->getMaps() as $map) { | ||||||
|  | 					try { | ||||||
| 						$this->maniaControl->getClient()->removeMap($map->fileName); | 						$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; | 				$this->maps = $maps; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user