Skip to content

Commit 66b8161

Browse files
committed
Scalar access exception messages improved
1 parent 3b7c9dd commit 66b8161

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Pointer/Evaluate/LocatorRead.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,6 @@ protected function createReferenceEvaluateUnknownIndex(Reference $reference)
5959

6060
protected function createReferenceEvaluateScalar(Reference $reference)
6161
{
62-
throw new EvaluateException("Cannot read non-structured data by reference");
62+
throw new EvaluateException("Cannot read non-structured data by reference '{$reference->getText()}'");
6363
}
6464
}

src/Pointer/Evaluate/LocatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,6 @@ protected function createReferenceEvaluateUnknownIndex(Reference $reference)
6060

6161
protected function createReferenceEvaluateScalar(Reference $reference)
6262
{
63-
throw new EvaluateException("Cannot test non-structured data by reference");
63+
throw new EvaluateException("Cannot test non-structured data by reference '{$reference->getText()}'");
6464
}
6565
}

src/Pointer/Evaluate/LocatorWrite.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,6 @@ protected function createReferenceEvaluateUnknownIndex(Reference $reference)
117117

118118
protected function createReferenceEvaluateScalar(Reference $reference)
119119
{
120-
throw new EvaluateException("Cannot write non-structured data by reference");
120+
throw new EvaluateException("Cannot write non-structured data by reference '{$reference->getText()}'");
121121
}
122122
}

0 commit comments

Comments
 (0)