Skip to content

Commit

Permalink
Fix quotes in exception messages
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Mar 16, 2020
1 parent 95f483b commit 9ccf6e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Parser/Handler/StringHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion XPath/Extension/FunctionExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 9ccf6e7

Please sign in to comment.