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 6a376f1ef..89a003511 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 @@ -761,8 +761,9 @@ public class ValidationEngine implements IValidatorResourceFetcher { System.out.print("* load file: "+fn); } System.out.println(" - ignored due to error: "+(e.getMessage() == null ? " (null - NPE)" : e.getMessage())); - if (debug) + if (debug || ((e.getMessage() != null && e.getMessage().contains("cannot be cast")))) { e.printStackTrace(); + } } return r; }