mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-06 03:47:16 +00:00
Config: throw AssumptionFailedError if config type is invalid or DETECT during save()
this should never happen ... it was already checked in load()
This commit is contained in:
parent
8b3565b75d
commit
4eef458d29
@ -205,8 +205,6 @@ class Config{
|
||||
|
||||
/**
|
||||
* Flushes the config to disk in the appropriate format.
|
||||
*
|
||||
* @throws \InvalidStateException if config type is not valid
|
||||
*/
|
||||
public function save() : void{
|
||||
$content = null;
|
||||
@ -227,7 +225,7 @@ class Config{
|
||||
$content = self::writeList(array_keys($this->config));
|
||||
break;
|
||||
default:
|
||||
throw new \InvalidStateException("Config type is unknown, has not been set or not detected");
|
||||
throw new AssumptionFailedError("Config type is unknown, has not been set or not detected");
|
||||
}
|
||||
|
||||
file_put_contents($this->file, $content);
|
||||
|
Loading…
x
Reference in New Issue
Block a user