mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-09 11:16:57 +00:00
Gracefully handle errors loading plugin manifest
this isn't perfect, but it covers the common cases. Now, the server won't spam crashdumps just because some plugin declared nested permissions.
This commit is contained in:
@ -246,6 +246,13 @@ class PluginManager{
|
||||
}
|
||||
try{
|
||||
$description = $loader->getPluginDescription($file);
|
||||
}catch(PluginDescriptionParseException $e){
|
||||
$this->server->getLogger()->error($this->server->getLanguage()->translate(KnownTranslationFactory::pocketmine_plugin_fileError(
|
||||
$file,
|
||||
$directory,
|
||||
KnownTranslationFactory::pocketmine_plugin_invalidManifest($e->getMessage())
|
||||
)));
|
||||
continue;
|
||||
}catch(\RuntimeException $e){ //TODO: more specific exception handling
|
||||
$this->server->getLogger()->error($this->server->getLanguage()->translate(KnownTranslationFactory::pocketmine_plugin_fileError($file, $directory, $e->getMessage())));
|
||||
$this->server->getLogger()->logException($e);
|
||||
|
Reference in New Issue
Block a user