2017-03-08 20:28:33 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
|
|
namespace Shaarli\Config\Exception;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 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;
|
2017-05-09 18:12:15 +02:00
|
|
|
$this->message = sprintf(t('Configuration value is required for %s'), $this->field);
|
2017-03-08 20:28:33 +01:00
|
|
|
}
|
|
|
|
}
|