From a138d23dafee5a72bcbd471960897ac6269742af Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Sun, 13 Dec 2015 22:19:02 +0100 Subject: [PATCH] Throw LogicException instead of RuntimeException in Pico::setConfig() --- CHANGELOG.md | 2 ++ lib/Pico.php | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b0877a..e56c290 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ Released: - all contributors and users which made this possible! * [New] Adding `$queryData` parameter to `Pico::getPageUrl()` method * [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 diff --git a/lib/Pico.php b/lib/Pico.php index 30de7be..afe78b8 100644 --- a/lib/Pico.php +++ b/lib/Pico.php @@ -267,7 +267,7 @@ class Pico * the rendered 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() { @@ -518,12 +518,12 @@ class Pico * @see Pico::getConfig() * @param mixed[] $config array with config variables * @return void - * @throws RuntimeException thrown if Pico already started processing + * @throws LogicException thrown if Pico already started processing */ public function setConfig(array $config) { 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;