diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/SnapShotGenerationTests.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/SnapShotGenerationTests.java index 4d1a31c92..56dd19970 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/SnapShotGenerationTests.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/SnapShotGenerationTests.java @@ -301,6 +301,7 @@ public class SnapShotGenerationTests { private final TestScriptTestComponent test; private final String name; private SnapShotGenerationTestsContext context; + private List messages; public SnapShotGenerationTests(String name, TestScriptTestComponent e, SnapShotGenerationTestsContext context) { this.name = name; @@ -312,6 +313,7 @@ public class SnapShotGenerationTests { @Test public void test() throws FHIRException { try { + messages = new ArrayList(); for (Resource cr : context.tests.getContained()) { if (cr instanceof StructureDefinition) { StructureDefinition sd = (StructureDefinition) cr; @@ -344,7 +346,7 @@ public class SnapShotGenerationTests { StructureDefinition source = (StructureDefinition) context.fetchFixture(op.getSourceId()); StructureDefinition base = getSD(source.getBaseDefinition()); StructureDefinition output = source.copy(); - ProfileUtilities pu = new ProfileUtilities(TestingUtilities.context(), null, new TestPKP()); + ProfileUtilities pu = new ProfileUtilities(TestingUtilities.context(), messages , new TestPKP()); pu.setIds(source, false); if ("sort=true".equals(op.getParams())) { List errors = new ArrayList(); diff --git a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/r5/validation/ValidationEngine.java b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/r5/validation/ValidationEngine.java index 6cd9e022c..4b72a9302 100644 --- a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/r5/validation/ValidationEngine.java +++ b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/r5/validation/ValidationEngine.java @@ -817,8 +817,9 @@ public class ValidationEngine { if (refs.size() > 1) produceValidationSummary(outcome); results.addEntry().setResource(outcome); - } catch (Throwable e) { + } catch (Exception e) { System.out.println("Validation Infrastructure fail validating "+ref+": "+e.getMessage()); + throw e; } } if (asBundle)