[Zope3-checkins] CVS: Packages/ZConfig - schema.py:1.1.2.23

Chris McDonough chrism@zope.com
Wed, 18 Dec 2002 15:44:51 -0500


Update of /cvs-repository/Packages/ZConfig
In directory cvs.zope.org:/tmp/cvs-serv16121

Modified Files:
      Tag: zconfig-schema-devel-branch
	schema.py 
Log Message:
Report lineno and colno in error messages.


=== Packages/ZConfig/schema.py 1.1.2.22 => 1.1.2.23 ===
--- Packages/ZConfig/schema.py:1.1.2.22	Wed Dec 18 11:15:59 2002
+++ Packages/ZConfig/schema.py	Wed Dec 18 15:44:50 2002
@@ -306,4 +306,8 @@
             return None, self._identifier(name), aname
 
     def error(self, message):
+        if self._locator is not None:
+            colno = self._locator.getColumnNumber()
+            lineno = self._locator.getLineNumber()
+            message = message + ' (at line %s, column %s)' % (lineno, colno)
         raise ZConfig.ConfigurationError(message)