[Lxml-checkins] r43692 - lxml/trunk/src/lxml
scoder at codespeak.net
scoder at codespeak.net
Sat May 26 20:48:57 CEST 2007
Author: scoder
Date: Sat May 26 20:48:56 2007
New Revision: 43692
Modified:
lxml/trunk/src/lxml/xpath.pxi
Log:
display first error in exception string instead of last one
Modified: lxml/trunk/src/lxml/xpath.pxi
==============================================================================
--- lxml/trunk/src/lxml/xpath.pxi (original)
+++ lxml/trunk/src/lxml/xpath.pxi Sat May 26 20:48:56 2007
@@ -158,7 +158,10 @@
if entry is not None and entry.message:
raise XPathSyntaxError, entry.message
- if self._xpathCtxt is not NULL and \
+ if self._error_log._first_error is not None and \
+ self._error_log._first_error.message is not None:
+ message = self._error_log._first_error.message
+ elif self._xpathCtxt is not NULL and \
self._xpathCtxt.lastError.message is not NULL:
message = funicode(self._xpathCtxt.lastError.message)
else:
More information about the lxml-checkins
mailing list