logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

r43712 - lxml/trunk/doc: msg#00101

Subject: r43712 - lxml/trunk/doc
Author: scoder
Date: Sun May 27 14:11:02 2007
New Revision: 43712

Modified:
   lxml/trunk/doc/api.txt
   lxml/trunk/doc/validation.txt
   lxml/trunk/doc/xpathxslt.txt
Log:
better exception messages in XPath, parsers and validators; major cleanup of 
error message extraction

Modified: lxml/trunk/doc/api.txt
==============================================================================
--- lxml/trunk/doc/api.txt      (original)
+++ lxml/trunk/doc/api.txt      Sun May 27 14:11:02 2007
@@ -301,7 +301,7 @@
   >>> etree.XML(notxml)
   Traceback (most recent call last):
     ...
-  XMLSyntaxError: line 1: error parsing attribute name
+  XMLSyntaxError: error parsing attribute name, line 1, column 3
 
 
 XInclude and ElementInclude

Modified: lxml/trunk/doc/validation.txt
==============================================================================
--- lxml/trunk/doc/validation.txt       (original)
+++ lxml/trunk/doc/validation.txt       Sun May 27 14:11:02 2007
@@ -118,12 +118,12 @@
   >>> relaxng.assertValid(doc2)
   Traceback (most recent call last):
     [...]
-  DocumentInvalid: Document does not comply with schema
+  DocumentInvalid: Did not expect element c there, line 1
 
   >>> relaxng.assert_(doc2)
   Traceback (most recent call last):
     [...]
-  AssertionError: Document does not comply with schema
+  AssertionError: Did not expect element c there, line 1
 
 If you want to find out why the validation failed in the second case, you can
 look up the error log of the validation process and check it for relevant
@@ -198,12 +198,12 @@
   >>> xmlschema.assertValid(doc2)
   Traceback (most recent call last):
     [...]
-  DocumentInvalid: Document does not comply with schema
+  DocumentInvalid: Element 'c': This element is not expected. Expected is ( b 
)., line 1
 
   >>> xmlschema.assert_(doc2)
   Traceback (most recent call last):
     [...]
-  AssertionError: Document does not comply with schema
+  AssertionError: Element 'c': This element is not expected. Expected is ( b 
)., line 1
 
 Error reporting works as for the RelaxNG class::
 

Modified: lxml/trunk/doc/xpathxslt.txt
==============================================================================
--- lxml/trunk/doc/xpathxslt.txt        (original)
+++ lxml/trunk/doc/xpathxslt.txt        Sun May 27 14:11:02 2007
@@ -313,7 +313,7 @@
   >>> find = root.xpath("\\")
   Traceback (most recent call last):
     ...
-  XPathEvalError: Error in xpath evaluation
+  XPathEvalError: Invalid expression
 
 Note that lxml versions before 1.3 always raised an ``XPathSyntaxError`` for
 all errors, including evaluation errors.  The best way to support older


<Prev in Thread] Current Thread [Next in Thread>