Server: avoid abusing Throwable in a couple of places

This commit is contained in:
Dylan K. Taylor 2018-05-10 12:46:13 +01:00
parent 7b3653f75d
commit d8d22efc3b

View File

@ -1541,7 +1541,7 @@ class Server{
$this->getIp(), $this->getIp(),
$this->getConfigInt("rcon.max-clients", 50) $this->getConfigInt("rcon.max-clients", 50)
); );
}catch(\Throwable $e){ }catch(\Exception $e){
$this->getLogger()->critical("RCON can't be started: " . $e->getMessage()); $this->getLogger()->critical("RCON can't be started: " . $e->getMessage());
} }
} }
@ -2108,7 +2108,7 @@ class Server{
$this->logger->info("[UPnP] Trying to port forward..."); $this->logger->info("[UPnP] Trying to port forward...");
try{ try{
UPnP::PortForward($this->getPort()); UPnP::PortForward($this->getPort());
}catch(\Throwable $e){ }catch(\Exception $e){
$this->logger->alert("UPnP portforward failed: " . $e->getMessage()); $this->logger->alert("UPnP portforward failed: " . $e->getMessage());
} }
} }