|
18 | 18 | from .constantsimporttokenTypes,ReparseException,namespaces
|
19 | 19 | from .constantsimporthtmlIntegrationPointElements,mathmlTextIntegrationPointElements
|
20 | 20 | from .constantsimportadjustForeignAttributesasadjustForeignAttributesMap
|
| 21 | +from .constantsimportE |
21 | 22 |
|
22 | 23 |
|
23 | 24 | defparse(doc,treebuilder="etree",encoding=None,
|
@@ -256,7 +257,7 @@ def parseError(self, errorcode="XXX-undefined-error", datavars={}):
|
256 | 257 | # XXX The idea is to make errorcode mandatory.
|
257 | 258 | self.errors.append((self.tokenizer.stream.position(),errorcode,datavars))
|
258 | 259 | ifself.strict:
|
259 |
| -raiseParseError |
| 260 | +raiseParseError(E[errorcode]%datavars) |
260 | 261 |
|
261 | 262 | defnormalizeToken(self,token):
|
262 | 263 | """ HTML5 specific normalizations to the token stream """
|
|