File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
bulk-model-sync-lib/src/commonMain/kotlin/org/modelix/model/sync/bulk Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -13,12 +13,22 @@ import org.modelix.model.api.getRootNode
13
13
import org.modelix.model.area.PArea
14
14
import org.modelix.model.data.NodeData
15
15
16
+ private val LOG = mu.KotlinLogging .logger { }
17
+
16
18
class NodeAssociationToModelServer (val branch : IBranch ) : INodeAssociation {
17
19
18
20
private val associations: MutableMap <String , IWritableNode > by lazy {
19
21
val map = HashMap <String , IWritableNode >()
20
- for (node in branch.getRootNode().getDescendants(true ).map { it.asWritableNode() }) {
21
- map[node.getPropertyValue(NodeData .ID_PROPERTY_REF ) ? : continue ] = node
22
+ try {
23
+ for (node in branch.getRootNode().getDescendants(true ).map { it.asWritableNode() }) {
24
+ try {
25
+ map[node.getPropertyValue(NodeData .ID_PROPERTY_REF ) ? : continue ] = node
26
+ } catch (ex: Exception ) {
27
+ LOG .error(ex) { " Reading associations from $node failed" }
28
+ }
29
+ }
30
+ } catch (ex: Exception ) {
31
+ LOG .error(ex) { " Reading associations from $branch failed" }
22
32
}
23
33
map
24
34
}
You can’t perform that action at this time.
0 commit comments