Improve reporting on bad indices.
This commit is contained in:
parent
493ad2c306
commit
7a64df78e3
1 changed files with 2 additions and 1 deletions
|
@ -185,12 +185,13 @@ class PropsHandler(handler.ContentHandler):
|
||||||
if 'include' in attrs.keys():
|
if 'include' in attrs.keys():
|
||||||
self.handleInclude(attrs['include'])
|
self.handleInclude(attrs['include'])
|
||||||
return
|
return
|
||||||
|
|
||||||
currentState = self._stateStack[-1]
|
currentState = self._stateStack[-1]
|
||||||
if 'n' in attrs.keys():
|
if 'n' in attrs.keys():
|
||||||
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)
|
||||||
|
|
Loading…
Reference in a new issue