Throw LogicException instead of RuntimeException in Pico::setConfig()
This commit is contained in:
parent
0c85d70820
commit
a138d23daf
@ -9,6 +9,8 @@ Released: -
|
|||||||
all contributors and users which made this possible!
|
all contributors and users which made this possible!
|
||||||
* [New] Adding `$queryData` parameter to `Pico::getPageUrl()` method
|
* [New] Adding `$queryData` parameter to `Pico::getPageUrl()` method
|
||||||
* [Changed] Moving `LICENSE` to `LICENSE.md`
|
* [Changed] Moving `LICENSE` to `LICENSE.md`
|
||||||
|
* [Changed] Throw `LogicException` instead of `RuntimeException` when calling
|
||||||
|
`Pico::setConfig()` after processing has started
|
||||||
```
|
```
|
||||||
|
|
||||||
### Version 1.0.0-beta.2
|
### Version 1.0.0-beta.2
|
||||||
|
@ -267,7 +267,7 @@ class Pico
|
|||||||
* the rendered contents.
|
* the rendered contents.
|
||||||
*
|
*
|
||||||
* @return string rendered Pico contents
|
* @return string rendered Pico contents
|
||||||
* @throws RuntimeException thrown when a not recoverable error occurs
|
* @throws Exception thrown when a not recoverable error occurs
|
||||||
*/
|
*/
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
@ -518,12 +518,12 @@ class Pico
|
|||||||
* @see Pico::getConfig()
|
* @see Pico::getConfig()
|
||||||
* @param mixed[] $config array with config variables
|
* @param mixed[] $config array with config variables
|
||||||
* @return void
|
* @return void
|
||||||
* @throws RuntimeException thrown if Pico already started processing
|
* @throws LogicException thrown if Pico already started processing
|
||||||
*/
|
*/
|
||||||
public function setConfig(array $config)
|
public function setConfig(array $config)
|
||||||
{
|
{
|
||||||
if ($this->locked) {
|
if ($this->locked) {
|
||||||
throw new RuntimeException("You cannot modify Pico's config after processing has started");
|
throw new LogicException("You cannot modify Pico's config after processing has started");
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->config = $config;
|
$this->config = $config;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user