Commit 9b6ecc97 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Catch exception if Overture is not running

parent 8fb23b54
......@@ -752,15 +752,24 @@ class sdlHandler(QObject):
print(u'Procedure {} in VDM... Connecting to Overture'
if not self.vdm:
self.vdm = vdmHandler.vdmHandler()
self.vdm = vdmHandler.vdmHandler()
except IOError as err:
print("Socket connection error: " + str(err))
self.log_area.addItem('ERROR: could not connect to '
tokens = each.comment.inputString.split("#")
classname = None
for tok in tokens:
if tok.startswith("classname"):
#TODO: catch exception
classname = tok.split("=")[1]
inst = self.vdm.instanciate_class(classname)
each.vdm_instance = inst
if self.vdm:
inst = self.vdm.instanciate_class(classname)
each.vdm_instance = inst
except (IOError, AttributeError) as err:
print("VDM class creation error: " + str(err))
elif "#c" in cmt:
print(u'Procedure {} in C... Loading DLL'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment