Bit more debugging on crashing story

This commit is contained in:
Ruben van de Ven 2019-05-10 11:38:57 +02:00
parent c64e2328e0
commit 9d8752ef7c

View file

@ -1022,9 +1022,14 @@ class Story(object):
self.reset() self.reset()
for el in self.data: for el in self.data:
try:
className = storyClasses[el['@type']] className = storyClasses[el['@type']]
obj = className.initFromJson(el, self) obj = className.initFromJson(el, self)
self.add(obj) self.add(obj)
except Exception as e:
self.logger.critical(f"Error loading story element: {el}")
self.logger.exception(e)
raise e
# self.logger.debug(self.elements) # self.logger.debug(self.elements)
# self.logger.debug(self.directionsPerMsg) # self.logger.debug(self.directionsPerMsg)