[XML-SIG] Noisier PyExpat error handling?
Thu, 23 Mar 2000 18:33:23 -0800 (PST)
On Thu, 23 Mar 2000, A.M. Kuchling wrote:
> I'm going over the PyExpat module to be sure it's ready for inclusion
> in the Python CVS tree. One point about its error handling is
> disquieting; it hews very closely to the C Expat interface, so that a
> parser error returns a 0, while success returns a 1. You then need to
> call pyexpat.ErrorString( p.ErrorCode ) to find out what went wrong.
> Pythonic principle #10 is "Errors should never pass silently"; should
> the module be changed to raise an exception on a parse error? (Best
> to break compatibility now, while we still can...)
Raise the exception, I say! :-)
Greg Stein, http://www.lyra.org/