This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients brett.cannon, scoder, serhiy.storchaka
Date 2015-12-06.15:00:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1449414003.26.0.361289515634.issue25814@psf.upfronthosting.co.za>
In-reply-to
Content
Some memory errors raised in handlers during XML parsing are explicitly or implicitly propagated to the caller of XMLParser methods feed(), close(), and _parse_whole(). But others are silenced with PyErr_Clear() with added comments "FIXME: propagate error". There are no reasons why one errors are propagated and others are not. For example memory error during creating tuple is not propagated, but memory error during resizing a list to which this tuple is appended is propagated. Looks as this is not intentional.

Not propagated errors can cause the lost of events. Proposed patch makes the parser to propagate all errors. Since it extracts common code into the treebuilder_append_event() function and inlines the treebuilder_handle_namespace() function, the resulting code becomes even simpler, its size is decreased by 49 lines.
History
Date User Action Args
2015-12-06 15:00:03serhiy.storchakasetrecipients: + serhiy.storchaka, brett.cannon, scoder
2015-12-06 15:00:03serhiy.storchakasetmessageid: <1449414003.26.0.361289515634.issue25814@psf.upfronthosting.co.za>
2015-12-06 15:00:02serhiy.storchakalinkissue25814 messages
2015-12-06 15:00:02serhiy.storchakacreate