From 0fc5801e5e8aa2998ad5af1189ff53b8645c827f Mon Sep 17 00:00:00 2001 From: Eric Lippmann <eric.lippmann@netways.de> Date: Tue, 7 Apr 2015 12:15:15 +0200 Subject: [PATCH] lib: Add MissingParameterException::getParameter and ::setParameter ... ... for getting/setting the name of the missing parameter which caused the exception. refs #8886 --- .../Exception/MissingParameterException.php | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/library/Icinga/Exception/MissingParameterException.php b/library/Icinga/Exception/MissingParameterException.php index 6ccd28dc3..4377ef103 100644 --- a/library/Icinga/Exception/MissingParameterException.php +++ b/library/Icinga/Exception/MissingParameterException.php @@ -8,4 +8,33 @@ namespace Icinga\Exception; */ 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; + } }