package org.simantics.db.layer0.util;
+import java.io.IOException;
import java.util.Arrays;
import java.util.Map;
configuration.exclusionFunction = TGRepresentationUtils.computeExclusionFunction(graph, resources, hints);
}
- ModelTransferableGraphSource source = graph.syncRequest(new ModelTransferableGraphSourceRequest(configuration));
- return TransferableGraphs.create(graph, source);
-
+ try (ModelTransferableGraphSource source = graph.syncRequest(new ModelTransferableGraphSourceRequest(configuration))) {
+ return TransferableGraphs.create(graph, source);
+ } catch (IOException e) {
+ throw new DatabaseException(e);
+ }
}
@SuppressWarnings("unchecked")