mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 08:17:34 +00:00
ZippedResourcePack: Make manifest parse errors less useless
This commit is contained in:
parent
eccc249009
commit
1ef6f5d166
@ -86,8 +86,11 @@ class ZippedResourcePack implements ResourcePack{
|
||||
$archive->close();
|
||||
|
||||
$manifest = json_decode($manifestData);
|
||||
if($manifest === null or !self::verifyManifest($manifest)){
|
||||
throw new ResourcePackException("manifest.json is invalid or incomplete");
|
||||
if($manifest === null){
|
||||
throw new ResourcePackException("Failed to parse manifest.json: " . json_last_error_msg());
|
||||
}
|
||||
if(!self::verifyManifest($manifest)){
|
||||
throw new ResourcePackException("manifest.json is missing required fields");
|
||||
}
|
||||
|
||||
$this->manifest = $manifest;
|
||||
|
Loading…
x
Reference in New Issue
Block a user