exception fix
This commit is contained in:
		
				
					committed by
					
						 Steffen Schröder
						Steffen Schröder
					
				
			
			
				
	
			
			
			
						parent
						
							3b5f7bd756
						
					
				
				
					commit
					154ed55908
				
			| @@ -6,6 +6,7 @@ use ManiaControl\Callbacks\CallbackListener; | |||||||
| use ManiaControl\Callbacks\CallbackManager; | use ManiaControl\Callbacks\CallbackManager; | ||||||
| use ManiaControl\ManiaControl; | use ManiaControl\ManiaControl; | ||||||
| use Maniaplanet\DedicatedServer\Xmlrpc\Exception; | use Maniaplanet\DedicatedServer\Xmlrpc\Exception; | ||||||
|  | use Maniaplanet\DedicatedServer\Xmlrpc\NotInScriptModeException; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * Class managing Rankings |  * Class managing Rankings | ||||||
| @@ -50,12 +51,7 @@ class RankingManager implements CallbackListener { | |||||||
| 	public function onInit() { | 	public function onInit() { | ||||||
| 		try { | 		try { | ||||||
| 			$this->maniaControl->client->triggerModeScriptEvent('LibXmlRpc_GetRankings', ''); | 			$this->maniaControl->client->triggerModeScriptEvent('LibXmlRpc_GetRankings', ''); | ||||||
| 		} catch(Exception $e) { | 		} catch(NotInScriptModeException $e) { | ||||||
| 			if ($e->getMessage() == 'Not in script mode.') { |  | ||||||
| 				//	do nothing |  | ||||||
| 				return; |  | ||||||
| 			} |  | ||||||
| 			throw $e; |  | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user