Skip to content

Commit

Permalink
lib: Add MissingParameterException::getParameter and ::setParameter ...
Browse files Browse the repository at this point in the history
... for getting/setting the name of the missing parameter which caused the exception.

refs #8886
  • Loading branch information
lippserd committed Apr 7, 2015
1 parent 4d79549 commit 0fc5801
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions library/Icinga/Exception/MissingParameterException.php
Expand Up @@ -8,4 +8,33 @@
*/
class MissingParameterException extends IcingaException
{
/**
* Name of the missing parameter
*
* @var string
*/
protected $parameter;

/**
* Get the name of the missing parameter
*
* @return string
*/
public function getParameter()
{
return $this->parameter;
}

/**
* Set the name of the missing parameter
*
* @param string $name
*
* @return $this
*/
public function setParameter($name)
{
$this->parameter = (string) $name;
return $this;
}
}

0 comments on commit 0fc5801

Please sign in to comment.