Skip to content

Commit

Permalink
Debug: Block YAML parsing errors are now fatal.
Browse files Browse the repository at this point in the history
  • Loading branch information
codewarrior0 committed Mar 4, 2014
1 parent 710e3d4 commit 1fac4de
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions materials.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,18 +167,18 @@ def addYamlBlocksFromFile(self, filename):
self.addYamlBlocks(blockyaml)

except Exception, e:
log.warn(u"Exception while loading block info from %s: %s", f, e)
traceback.print_exc()
log.error(u"Exception while loading block info from %s: %s", f, e)
raise

def addYamlBlocks(self, blockyaml):
self.yamlDatas.append(blockyaml)
for block in blockyaml['blocks']:
try:
self.addYamlBlock(block)
except Exception, e:
log.warn(u"Exception while parsing block: %s", e)
traceback.print_exc()
log.warn(u"Block definition: \n%s", pformat(block))
log.error(u"Exception while parsing block: %s", e)
log.error(u"Block definition: \n%s", pformat(block))
raise

def addYamlBlock(self, kw):
blockID = kw['id']
Expand Down

1 comment on commit 1fac4de

@Lechros
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still need PocketMaterial thing?

Please sign in to comment.