mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-11 04:17:48 +00:00
Server: avoid abusing Throwable in a couple of places
This commit is contained in:
parent
7b3653f75d
commit
d8d22efc3b
@ -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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user