
On 12/05/2014 03:59 PM, Stefan Behnel wrote:
Could you provide some example code that illustrates this, and mark the places where the exception is available and where it's lost?
Is it possible that the output stream is closed (or otherwise unwritable) when your post-processing exception is raised, so that an actual IOError is raised when trying to write out the closing tags, which then shadows the original exception?
I assume you're using Python 2.x, which cannot chain exceptions?
Stefan
Hi, I cooked up a testcase (attached), which illustrates the issue. It looks like lxml just eats any exceptions in the output, leaving the output in a broken state. Only if you try to write to that same output again, things explode. Yes, this is Python 2.x. Thanks again for looking into this!