From 5ba55f0cf287c583019bbb731ad98e04a14da972 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Wed, 8 Mar 2017 20:28:33 +0100 Subject: Move config exception to dedicated classes with proper namespace --- application/config/ConfigManager.php | 36 +++--------------------------------- 1 file changed, 3 insertions(+), 33 deletions(-) (limited to 'application/config/ConfigManager.php') diff --git a/application/config/ConfigManager.php b/application/config/ConfigManager.php index 679a75b3..f2097410 100644 --- a/application/config/ConfigManager.php +++ b/application/config/ConfigManager.php @@ -1,6 +1,9 @@ configIO = $configIO; } } - -/** - * Exception used if a mandatory field is missing in given configuration. - */ -class MissingFieldConfigException extends \Exception -{ - public $field; - - /** - * Construct exception. - * - * @param string $field field name missing. - */ - public function __construct($field) - { - $this->field = $field; - $this->message = 'Configuration value is required for '. $this->field; - } -} - -/** - * Exception used if an unauthorized attempt to edit configuration has been made. - */ -class UnauthorizedConfigException extends \Exception -{ - /** - * Construct exception. - */ - public function __construct() - { - $this->message = 'You are not authorized to alter config.'; - } -} -- cgit v1.2.3