diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Element.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Element.java index 13d54742f..b55dde38e 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Element.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Element.java @@ -426,9 +426,9 @@ public abstract class Element extends Base implements IBaseHasExtensions, IBaseE if (ext.isEmpty()) return null; if (ext.size() > 1) - throw new FHIRException("Multiple matching extensions found"); + throw new FHIRException("Multiple matching extensions found for extension '"+theUrl+"'"); if (!ext.get(0).getValue().isPrimitive()) - throw new FHIRException("Extension could not be converted to a string"); + throw new FHIRException("Extension '"+theUrl+"' could not be converted to a string"); return ext.get(0).getValue().primitiveValue(); }