improve error message
This commit is contained in:
parent
6833ddd110
commit
939d1d06c0
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue