1022 raise PLCGenException( |
1022 raise PLCGenException( |
1023 _("Undefined block type \"{a1}\" in \"{a2}\" POU"). |
1023 _("Undefined block type \"{a1}\" in \"{a2}\" POU"). |
1024 format(a1=block_type, a2=self.Name)) |
1024 format(a1=block_type, a2=self.Name)) |
1025 try: |
1025 try: |
1026 self.GenerateBlock(instance, block_infos, body, None) |
1026 self.GenerateBlock(instance, block_infos, body, None) |
1027 except ValueError, e: |
1027 except ValueError as e: |
1028 raise PLCGenException(e.message) |
1028 raise PLCGenException(e.message) |
1029 elif isinstance(instance, ConnectorClass): |
1029 elif isinstance(instance, ConnectorClass): |
1030 connector = instance.getname() |
1030 connector = instance.getname() |
1031 if self.ComputedConnectors.get(connector, None): |
1031 if self.ComputedConnectors.get(connector, None): |
1032 continue |
1032 continue |
1300 raise PLCGenException( |
1300 raise PLCGenException( |
1301 _("Undefined block type \"{a1}\" in \"{a2}\" POU"). |
1301 _("Undefined block type \"{a1}\" in \"{a2}\" POU"). |
1302 format(a1=block_type, a2=self.Name)) |
1302 format(a1=block_type, a2=self.Name)) |
1303 try: |
1303 try: |
1304 paths.append(str(self.GenerateBlock(next, block_infos, body, connection, order, to_inout))) |
1304 paths.append(str(self.GenerateBlock(next, block_infos, body, connection, order, to_inout))) |
1305 except ValueError, e: |
1305 except ValueError as e: |
1306 raise PLCGenException(e.message) |
1306 raise PLCGenException(e.message) |
1307 elif isinstance(next, ContinuationClass): |
1307 elif isinstance(next, ContinuationClass): |
1308 name = next.getname() |
1308 name = next.getname() |
1309 computed_value = self.ComputedConnectors.get(name, None) |
1309 computed_value = self.ComputedConnectors.get(name, None) |
1310 if computed_value is not None: |
1310 if computed_value is not None: |