mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-09 03:06:55 +00:00
Remove another Throwable abuse
This commit is contained in:
@ -32,6 +32,7 @@ use function is_resource;
|
||||
use function strftime;
|
||||
use function strtolower;
|
||||
use function time;
|
||||
use function trim;
|
||||
|
||||
class BanList{
|
||||
|
||||
@ -156,14 +157,14 @@ class BanList{
|
||||
if($line{0} !== "#"){
|
||||
try{
|
||||
$entry = BanEntry::fromString($line);
|
||||
if($entry instanceof BanEntry){
|
||||
if($entry !== null){
|
||||
$this->list[$entry->getName()] = $entry;
|
||||
}
|
||||
}catch(\Throwable $e){
|
||||
}catch(\RuntimeException $e){
|
||||
$logger = \GlobalLogger::get();
|
||||
$logger->critical("Failed to parse ban entry from string \"$line\": " . $e->getMessage());
|
||||
$logger->logException($e);
|
||||
$logger->critical("Failed to parse ban entry from string \"" . trim($line) . "\": " . $e->getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
fclose($fp);
|
||||
|
Reference in New Issue
Block a user