Merge pull request #461 from realizm/master
Fixing exception when validation issues #458
This commit is contained in:
commit
eecf74576f
|
@ -1056,7 +1056,7 @@ public class ProfileUtilities extends TranslatingUtilities {
|
||||||
baseCursor = indexOfFirstNonChild(base, currentBase, baseCursor+1, baseLimit);
|
baseCursor = indexOfFirstNonChild(base, currentBase, baseCursor+1, baseLimit);
|
||||||
} else {
|
} else {
|
||||||
if (outcome.getType().size() == 0) {
|
if (outcome.getType().size() == 0) {
|
||||||
throw new DefinitionException(context.formatMessage(I18nConstants._HAS_NO_CHILDREN__AND_NO_TYPES_IN_PROFILE_, diffMatches.get(0).getPath(), differential.getElement().get(diffCursor).getPath(), profileName));
|
throw new DefinitionException(context.formatMessage(I18nConstants._HAS_NO_CHILDREN__AND_NO_TYPES_IN_PROFILE_, cpath, differential.getElement().get(diffCursor).getPath(), profileName));
|
||||||
}
|
}
|
||||||
boolean nonExtension = false;
|
boolean nonExtension = false;
|
||||||
if (outcome.getType().size() > 1) {
|
if (outcome.getType().size() > 1) {
|
||||||
|
@ -1075,7 +1075,7 @@ public class ProfileUtilities extends TranslatingUtilities {
|
||||||
}
|
}
|
||||||
StructureDefinition dt = outcome.getType().size() > 1 ? context.fetchTypeDefinition("Element") : getProfileForDataType(outcome.getType().get(0));
|
StructureDefinition dt = outcome.getType().size() > 1 ? context.fetchTypeDefinition("Element") : getProfileForDataType(outcome.getType().get(0));
|
||||||
if (dt == null) {
|
if (dt == null) {
|
||||||
throw new DefinitionException(context.formatMessage(I18nConstants.UNKNOWN_TYPE__AT_, outcome.getType().get(0), diffMatches.get(0).getPath()));
|
throw new DefinitionException(context.formatMessage(I18nConstants.UNKNOWN_TYPE__AT_, outcome.getType().get(0), cpath));
|
||||||
}
|
}
|
||||||
contextName = dt.getUrl();
|
contextName = dt.getUrl();
|
||||||
int start = diffCursor;
|
int start = diffCursor;
|
||||||
|
|
Loading…
Reference in New Issue