SVGHMI: nicer error message svghmi
authorEdouard Tisserant
Wed, 02 Sep 2020 11:45:41 +0200
branchsvghmi
changeset 3051 44dd48070e41
parent 3050 f9d494d11339
child 3052 ffce85221ea5
SVGHMI: nicer error message
svghmi/svghmi.py
--- a/svghmi/svghmi.py	Tue Sep 01 11:15:48 2020 +0200
+++ b/svghmi/svghmi.py	Wed Sep 02 11:45:41 2020 +0200
@@ -216,7 +216,8 @@
                 hmi_types_instances.pop(i)
                 break
 
-        assert(hmi_tree_root is not None)
+        if hmi_tree_root is None:
+            self.FatalError("SVGHMI : Library is selected but not used. Please either deselect it in project config or add a SVGHMI node to project.")
 
         # deduce HMI tree from PLC HMI_* instances
         for v in hmi_types_instances: