plone/plone.supermodel — pull request #2 by davisagli (2012-02-26 00:37:06+00:00)
Title: Improve reporting of parse errors

This branch makes supermodel report exceptions encountered while parsing a model in a much more helpful way. (Currently the exception does not even identify which model file was being parsed.)

The parser now keeps track of the current element being processed in a thread local stack so that the it can be reported if there is an exception.

The filename is always reported. If lxml is present then we can also get the line number of the element and include the line in the exception message.