heynemann/pyvows — pull request #81 by Zearin (2013-02-19 15:12:02+00:00)
Title: Close #48: Now catching internal errors when printing tracebacks

I was having a difficult time thinking of how to write a test for #48. And I’m pretty sure #48 had been fixed by an earlier commit anyways.

But even though writing a test was proving tricky, it was relatively easy to spot where the problem could occur. So I wrote a general-purpose `PyVowsInternalError` class, and put in a `try...except` where no errors *should* occur.

It’s not technically a “fix”…but it should alert users that there was a runtime error in PyVows, and not their own code (or tests).

----

It’s not ideal. But it should guard against #48 (if indeed it still occurs). And it can certainly get replaced by a better solution, if anyone has one. ;)