Entity: report the class in getSaveId() unregistered entity exception (#3744)

This commit is contained in:
VixikHD 2020-08-03 01:20:28 +02:00 committed by GitHub
parent f0a0c9a85f
commit 41f7c07703
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -868,7 +868,7 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
*/
public function getSaveId() : string{
if(!isset(self::$saveNames[static::class])){
throw new \InvalidStateException("Entity is not registered");
throw new \InvalidStateException("Entity " . static::class . " is not registered");
}
reset(self::$saveNames[static::class]);
return current(self::$saveNames[static::class]);