We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f644865 commit 325aeaaCopy full SHA for 325aeaa
html5lib/html5parser.py
@@ -18,6 +18,7 @@
18
from .constants import tokenTypes, ReparseException, namespaces
19
from .constants import htmlIntegrationPointElements, mathmlTextIntegrationPointElements
20
from .constants import adjustForeignAttributes as adjustForeignAttributesMap
21
+from .constants import E
22
23
24
def parse(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.
258
self.errors.append((self.tokenizer.stream.position(), errorcode, datavars))
259
if self.strict:
- raise ParseError
260
+ raise ParseError(E[errorcode] % datavars)
261
262
def normalizeToken(self, token):
263
""" HTML5 specific normalizations to the token stream """
0 commit comments