Skip to content

Commit 8d2b794

Browse files
committed
Print keyword location in StaticKeywordAnalysisException message
1 parent 245f417 commit 8d2b794

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Keyword/Exception/StaticKeywordAnalysisException.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ public function __construct(
1414
private readonly StaticKeywordInterface $keyword,
1515
private readonly StaticEvaluationContext $context
1616
) {
17-
parent::__construct(sprintf($message, $this->keyword->getName()));
17+
parent::__construct(
18+
sprintf($message, $this->keyword->getName())
19+
. ' at location '
20+
. $context->getCurrentSchemaKeywordLocation()
21+
);
1822
}
1923

2024
public function getContext(): StaticEvaluationContext

0 commit comments

Comments
 (0)