]> gerrit.simantics Code Review - simantics/district.git/commitdiff
Block exceptions actually caused by pending values from console. 55/2855/1
authorReino Ruusu <reino.ruusu@semantum.fi>
Wed, 17 Apr 2019 14:52:34 +0000 (17:52 +0300)
committerReino Ruusu <reino.ruusu@semantum.fi>
Wed, 17 Apr 2019 14:53:19 +0000 (17:53 +0300)
MissingVariableValueExceptions are thrown by getProperty() calls when
pending values are cached for domain properties.

gitlab #44

Change-Id: I2ca32821feb020defad4e55f2dd5893e9d4083f7

org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/DistrictNetworkHoverInfoStyle.java

index 590903e050c69d307d8e4514b3f86f24d5a3492e..ddcf1dde835426aedcfd02e2c03f701e11f8e39e 100644 (file)
@@ -11,6 +11,7 @@ import org.simantics.db.Resource;
 import org.simantics.db.common.procedure.adapter.TransientCacheListener;
 import org.simantics.db.common.request.ResourceRead;
 import org.simantics.db.exception.DatabaseException;
+import org.simantics.db.layer0.exception.MissingVariableValueException;
 import org.simantics.db.layer0.exception.PendingVariableException;
 import org.simantics.db.layer0.util.Layer0Utils;
 import org.simantics.db.layer0.variable.Variable;
@@ -99,7 +100,7 @@ public class DistrictNetworkHoverInfoStyle extends StyleBase<DistrictNetworkHove
                                moduleVariable = variable;
 
                        result = Simantics.applySCLRead(graph, function, moduleVariable);
-               } catch (PendingVariableException e) {
+               } catch (PendingVariableException | MissingVariableValueException e) {
                        result = Collections.singletonList(new Tuple3("<pending>", "", ""));
                }