From cc38567c93800ebac7724742eee127bd2738d69c Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Wed, 26 Oct 2022 23:20:42 +1100 Subject: [PATCH] fix r4b test failure --- .../java/org/hl7/fhir/r4b/utils/FHIRPathEngine.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/org.hl7.fhir.r4b/src/main/java/org/hl7/fhir/r4b/utils/FHIRPathEngine.java b/org.hl7.fhir.r4b/src/main/java/org/hl7/fhir/r4b/utils/FHIRPathEngine.java index 22ea8adfd..e990fb71d 100644 --- a/org.hl7.fhir.r4b/src/main/java/org/hl7/fhir/r4b/utils/FHIRPathEngine.java +++ b/org.hl7.fhir.r4b/src/main/java/org/hl7/fhir/r4b/utils/FHIRPathEngine.java @@ -578,7 +578,15 @@ public class FHIRPathEngine { } private FHIRException makeExceptionPL(Integer num, ExpressionNode holder, String constName, Object... args) { - return makeException(holder, constName, args); + String fmt = worker.formatMessagePL(num, constName, args); + if (location != null) { + fmt = fmt + " "+worker.formatMessage(I18nConstants.FHIRPATH_LOCATION, location); + } + if (holder != null) { + return new PathEngineException(fmt, holder.getStart(), holder.toString()); + } else { + return new PathEngineException(fmt); + } } private FHIRException makeException(ExpressionNode holder, String constName, Object... args) {