Improve error messages in Repository configuration

This commit is contained in:
netkas 2024-09-18 15:30:44 -04:00
parent 8e6acbbc70
commit 46fd39c51c

View file

@ -163,12 +163,12 @@
if($type === null) if($type === null)
{ {
throw new ConfigurationException("The UpdateSource's Repository property requires 'type'"); throw new ConfigurationException(sprintf("The UpdateSource's Repository %s property requires 'type' got '%s' instead", $name, Functions::array_bc($data, 'type')));
} }
if($host === null) if($host === null)
{ {
throw new ConfigurationException("The UpdateSource's Repository property requires 'host'"); throw new ConfigurationException(sprintf("The UpdateSource's Repository %s property requires 'host'", $name));
} }
return new self($name, $host, $type, $ssl); return new self($name, $host, $type, $ssl);