better debugging loading context

This commit is contained in:
Grahame Grieve 2020-01-13 13:00:33 +11:00
parent 1d3d21d4bc
commit 2ca363a88f
1 changed files with 6 additions and 2 deletions

View File

@ -317,12 +317,16 @@ public class SimpleWorkerContext extends BaseWorkerContext implements IWorkerCon
loadFromStream(new CSFileInputStream(path), loader);
}
public void loadFromPackage(NpmPackage pi, IContextResourceLoader loader, ILoadFilter filter) throws FileNotFoundException, IOException, FHIRException {
public void loadFromPackage(NpmPackage pi, IContextResourceLoader loader, ILoadFilter filter) throws IOException {
if (progress) {
System.out.println("Load Package "+pi.name()+"#"+pi.version());
}
for (String s : pi.listResources(loader.getTypes())) {
loadDefinitionItem(s, pi.load("package", s), loader, filter);
try {
loadDefinitionItem(s, pi.load("package", s), loader, filter);
} catch (FHIRException | IOException e) {
throw new FHIRException("Error reading "+s+" from package "+pi.name()+"#"+pi.version()+": "+e.getMessage(), e);
}
}
for (String s : pi.list("other")) {
binaries.put(s, TextFile.streamToBytes(pi.load("other", s)));