From 7f6438e03c1e33fa780d08ab2cb1716dae9c7250 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 7 Jul 2020 16:11:10 +0200 Subject: [PATCH] FilterParseException: Store invalid char and its position --- .../Data/Filter/FilterParseException.php | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/library/Icinga/Data/Filter/FilterParseException.php b/library/Icinga/Data/Filter/FilterParseException.php index f2b732bc4..5c33fb996 100644 --- a/library/Icinga/Data/Filter/FilterParseException.php +++ b/library/Icinga/Data/Filter/FilterParseException.php @@ -7,4 +7,25 @@ use Icinga\Exception\IcingaException; class FilterParseException extends IcingaException { + protected $char; + + protected $charPos; + + public function __construct($message, $filter, $char, $charPos, ...$additional) + { + parent::__construct($message, $filter, $char, $charPos, ...$additional); + + $this->char = $char; + $this->charPos = $charPos; + } + + public function getChar() + { + return $this->char; + } + + public function getCharPos() + { + return $this->charPos; + } }