]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.modeling/src/org/simantics/modeling/ImmutableComponentPropertyContentRequest.java
Still working for multiple readers
[simantics/platform.git] / bundles / org.simantics.modeling / src / org / simantics / modeling / ImmutableComponentPropertyContentRequest.java
index 32db2bb90445ae4b904453b030e398ba9b75bc77..61ffac8374c5481bb80684c30163277a7065a3e3 100644 (file)
@@ -16,6 +16,7 @@ import org.simantics.db.layer0.request.PropertyInfo;
 import org.simantics.db.layer0.request.UnescapedPropertyMapOfResource;
 import org.simantics.db.layer0.variable.ValueAccessor;
 import org.simantics.db.layer0.variable.Variable;
+import org.simantics.diagram.Logger;
 import org.simantics.layer0.Layer0;
 import org.simantics.scl.runtime.SCLContext;
 import org.simantics.scl.runtime.function.Function1;
@@ -79,9 +80,13 @@ public class ImmutableComponentPropertyContentRequest extends BinaryRead<Resourc
 
                                        ExternalValue ev = graph.adapt(converter, ExternalValue.class);
                                        if(ev instanceof ConverterExternalValue) {
-                                               ConverterExternalValue cev = (ConverterExternalValue)ev; 
-                                               Function1 fn  = cev.getFunction(graph, resource, value, pi.predicate);
-                                               return new ImmutableComponentPropertyContent(pi, value, null, fn);
+                                               ConverterExternalValue cev = (ConverterExternalValue)ev;
+                                               try {
+                                                       Function1 fn  = cev.getFunction(graph, resource, value, pi.predicate);
+                                                       return new ImmutableComponentPropertyContent(pi, value, null, fn);
+                                               } catch (DatabaseException e) {
+                                                       Logger.defaultLogError(e);
+                                               }
                                        } else {
                                                System.err.println("Undefined converter " + graph.getURI(converter));
                                        }