Commit ffb97c9b authored by Evan Simpson's avatar Evan Simpson

Collector #426: Inconsistent, undocumented error() method.

parent 970f0cea
......@@ -33,6 +33,8 @@ Zope Changes
(such as storages, databases, or logging handlers) to be used.
Bugs fixed
- Collector #426: Inconsistent, undocumented error() method.
- Collector #799: Eliminate improper uses of SCRIPT_NAME.
- Collector #445: Add internal global declaration for Script bindings.
......
......@@ -20,6 +20,13 @@ class ParserBase:
"""Return current line number and offset."""
return self.lineno, self.offset
def error(self, message):
"""Return an error, showing current line number and offset.
Concrete subclasses *must* override this method.
"""
raise NotImplementedError
# Internal -- update line number and offset. This should be
# called for each piece of data exactly once, in order -- in other
# words the concatenation of all the input strings to this
......@@ -302,4 +309,4 @@ class ParserBase:
return name.lower(), m.end()
else:
self.updatepos(declstartpos, i)
self.error("expected name token", self.getpos())
self.error("expected name token")
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment