try {
ValidationException[] shortList = testAgainstProfile(msg, id);
log.debug("{} non-conformances", shortList.length);
problems.addAll(Arrays.asList(shortList));
} catch (ProfileException e) {
problems.add(new ValidationException("Can't validate against profile: " + e.getMessage(), e));
}
}
} catch (HL7Exception e) {
problems.add(new ValidationException("Can't validate against profile: " + e.getMessage(), e));
}
return problems.toArray(new ValidationException[problems.size()]);
}