diff --git a/Parser/Handler/StringHandler.php b/Parser/Handler/StringHandler.php index 9869176..72e94c3 100644 --- a/Parser/Handler/StringHandler.php +++ b/Parser/Handler/StringHandler.php @@ -55,7 +55,7 @@ public function handle(Reader $reader, TokenStream $stream) $match = $reader->findPattern($this->patterns->getQuotedStringPattern($quote)); if (!$match) { - throw new InternalErrorException(sprintf('Should have found at least an empty match at %s.', $reader->getPosition())); + throw new InternalErrorException(sprintf('Should have found at least an empty match at %d.', $reader->getPosition())); } // check unclosed strings diff --git a/XPath/Extension/FunctionExtension.php b/XPath/Extension/FunctionExtension.php index 103b6a5..a121ab8 100644 --- a/XPath/Extension/FunctionExtension.php +++ b/XPath/Extension/FunctionExtension.php @@ -58,7 +58,7 @@ public function translateNthChild(XPathExpr $xpath, FunctionNode $function, $las try { list($a, $b) = Parser::parseSeries($function->getArguments()); } catch (SyntaxErrorException $e) { - throw new ExpressionErrorException(sprintf('Invalid series: %s.', implode(', ', $function->getArguments())), 0, $e); + throw new ExpressionErrorException(sprintf('Invalid series: "%s".', implode('", "', $function->getArguments())), 0, $e); } $xpath->addStarPrefix();