]>
Commit | Line | Data |
---|---|---|
5ba55f0c A |
1 | <?php |
2 | ||
3 | ||
4 | namespace Shaarli\Config\Exception; | |
5 | ||
6 | /** | |
7 | * Exception used if a mandatory field is missing in given configuration. | |
8 | */ | |
9 | class 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; | |
12266213 | 21 | $this->message = sprintf(t('Configuration value is required for %s'), $this->field); |
5ba55f0c A |
22 | } |
23 | } |