aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/config/exception/MissingFieldConfigException.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2017-03-08 20:28:33 +0100
committerArthurHoaro <arthur@hoa.ro>2017-03-09 19:16:42 +0100
commit5ba55f0cf287c583019bbb731ad98e04a14da972 (patch)
treed744155a1b68a203d4483195202d3d8562d02cf0 /application/config/exception/MissingFieldConfigException.php
parent9c5daad19c850d852f2e78ca571ad199362c0ffe (diff)
downloadShaarli-5ba55f0cf287c583019bbb731ad98e04a14da972.tar.gz
Shaarli-5ba55f0cf287c583019bbb731ad98e04a14da972.tar.zst
Shaarli-5ba55f0cf287c583019bbb731ad98e04a14da972.zip
Move config exception to dedicated classes with proper namespace
Diffstat (limited to 'application/config/exception/MissingFieldConfigException.php')
-rw-r--r--application/config/exception/MissingFieldConfigException.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/application/config/exception/MissingFieldConfigException.php b/application/config/exception/MissingFieldConfigException.php
new file mode 100644
index 00000000..6346c6a9
--- /dev/null
+++ b/application/config/exception/MissingFieldConfigException.php
@@ -0,0 +1,23 @@
1<?php
2
3
4namespace Shaarli\Config\Exception;
5
6/**
7 * Exception used if a mandatory field is missing in given configuration.
8 */
9class MissingFieldConfigException extends \Exception
10{
11 public $field;
12
13 /**
14 * Construct exception.
15 *
16 * @param string $field field name missing.
17 */
18 public function __construct($field)
19 {
20 $this->field = $field;
21 $this->message = 'Configuration value is required for '. $this->field;
22 }
23}