better error message

This commit is contained in:
Grahame Grieve 2023-01-21 07:36:09 +11:00
parent ecf775af38
commit 2c93585bb6
1 changed files with 1 additions and 1 deletions

View File

@ -1801,7 +1801,7 @@ public class FHIRPathEngine {
throw new PathEngineException("The type "+tn+" is not valid");
}
if (!doNotEnforceAsSingletonRule && left.size() > 1) {
throw new PathEngineException("Attempt to use as on more than one item ("+left.size()+")");
throw new PathEngineException("Attempt to use as on more than one item ("+left.size()+", '"+expr.toString()+"')");
}
for (Base nextLeft : left) {
if (tn.equals(nextLeft.fhirType())) {