[XML-SIG] Noisier PyExpat error handling?
Thu, 23 Mar 2000 21:15:31 -0500
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...)
A.M. Kuchling http://starship.python.net/crew/amk/
"That's kind of my uh sort of a joke."
"That's right, George. It differs from the usual kind of joke only in the
vast gulf between it and any kind of a sense of humor."
-- George's face and Wanda, in SANDMAN #36: "Over the Sea to Sky"