Commit e9629913 authored by VIGNET Pierre's avatar VIGNET Pierre
Browse files

[lib] proper error handling during the model parsing

parent 56fdb768
...@@ -371,10 +371,10 @@ class MakeHandler(ContentHandler): ...@@ -371,10 +371,10 @@ class MakeHandler(ContentHandler):
try: try:
node_ori = self.node_dict[ori] node_ori = self.node_dict[ori]
node_ext = self.node_dict[ext] node_ext = self.node_dict[ext]
except Exception as exc: except KeyError as exc:
print("Bad xml file - missing nodes", ori, " -> ", ext) LOGGER.error("Bad xml file - missing nodes %s in %s -> %s", exc, ori, ext)
print(self.node_dict) LOGGER.error("Nodes in memory: %s", self.node_dict)
print(exc) raise
self.current_element = self.top_pile.add_transition(node_ori, node_ext) self.current_element = self.top_pile.add_transition(node_ori, node_ext)
# The transition may not be created (origin = ext for example) # The transition may not be created (origin = ext for example)
......
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