File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Original file line number Diff line number Diff line change 18
18
from .constants import tokenTypes , ReparseException , namespaces
19
19
from .constants import htmlIntegrationPointElements , mathmlTextIntegrationPointElements
20
20
from .constants import adjustForeignAttributes as adjustForeignAttributesMap
21
+ from .constants import E
21
22
22
23
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.
257
258
self .errors .append ((self .tokenizer .stream .position (), errorcode , datavars ))
258
259
if self .strict :
259
- raise ParseError
260
+ raise ParseError ( E [ errorcode ] % datavars )
260
261
261
262
def normalizeToken (self , token ):
262
263
""" HTML5 specific normalizations to the token stream """
You can’t perform that action at this time.
0 commit comments