Commit e761b97c authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Report undeclared signals in the GUI

parent dbc24a85
......@@ -346,6 +346,7 @@ def get_interfaces(ast, process_name):
raise TypeError('Process ' + process_name +
' is defined but not declared in a system')
# Find in and out signals names using the signalroutes
undeclared_signals = []
for each in process_parent.signalroutes:
for route in each['routes']:
if route['source'] == process_name:
......@@ -362,7 +363,10 @@ def get_interfaces(ast, process_name):
found['direction'] = direction
async_signals.append(found)
except ValueError:
LOG.error('Signal {} is not declared'.format(sig_id))
undeclared_signals.append(sig_id)
if undeclared_signals:
raise TypeError('Missing declaration for signal(s) {}'
.format(', '.join(undeclared_signals)))
return async_signals, system.procedures
......
......@@ -1312,8 +1312,8 @@ class SDL_View(QtGui.QGraphicsView, object):
else:
# Otherwise, double-click edits the item text
item.edit_text(self.mapToScene(evt.pos()))
except AttributeError:
LOG.debug('Ignoring double click')
except AttributeError as err:
LOG.debug('Ignoring double click:' + str(err))
# pylint: disable=C0103
def mouseMoveEvent(self, evt):
......@@ -1423,6 +1423,7 @@ class SDL_View(QtGui.QGraphicsView, object):
ast, warnings, errors = ogParser.parse_pr(files=files)
except IOError:
LOG.error('Aborting: could not open or parse input file')
sdlSymbols.CONTEXT = ogAST.Block()
return
try:
process, = ast.processes
......
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