Improve reporting on bad indices.
This commit is contained in:
@@ -191,6 +191,7 @@ class PropsHandler(handler.ContentHandler):
|
|||||||
try:
|
try:
|
||||||
index = int(attrs['n'])
|
index = int(attrs['n'])
|
||||||
except:
|
except:
|
||||||
|
print "Invalid index at line:", self._locator.getLineNumber(), "of", self._path
|
||||||
raise IndexError("Invalid index at line:", self._locator.getLineNumber(), "of", self._path)
|
raise IndexError("Invalid index at line:", self._locator.getLineNumber(), "of", self._path)
|
||||||
|
|
||||||
currentState.recordExplicitIndex(name, index)
|
currentState.recordExplicitIndex(name, index)
|
||||||
|
|||||||
Reference in New Issue
Block a user