--- a/runtime/PLCObject.py Fri Apr 19 10:53:02 2019 +0200
+++ b/runtime/PLCObject.py Fri Apr 19 13:11:42 2019 +0200
@@ -109,9 +109,9 @@
self.CurrentPLCFilename = open(
"r").read().strip() + lib_ext
- self.PLCStatus = PlcStatus.Stopped
+ self.PLCStatus = PlcStatus.Stopped @@ -451,6 +451,16 @@
+ self.LogMessage(0, msg) + self.PLCStatus = PlcStatus.Broken + if self.PLClibraryHandle is None: + fail(_("Problem starting PLC : can't load PLC")) if self.CurrentPLCFilename is not None and self.PLCStatus == PlcStatus.Stopped:
c_argv = ctypes.c_char_p * len(self.argv)
res = self._startPLC(len(self.argv), c_argv(*self.argv))
@@ -460,9 +470,7 @@
self.PythonThreadCommand("Activate")
self.LogMessage("PLC started")
- self.LogMessage(0, _("Problem starting PLC : error %d" % res))
- self.PLCStatus = PlcStatus.Broken
+ fail(_("Problem starting PLC : error %d" % res))