mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 02:08:21 +00:00
Server: avoid abusing Throwable in a couple of places
This commit is contained in:
@ -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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user