Message23075
When SGMLParser encounters a badly formed webpage, it
throws sgmllib.SGMLParseError with a cryptic message:
[bin] > python sgmlparsertest.py
Pythonlib's error message: expected name token
I think it should give the line and offset, and maybe
even the text it had problems with, in the args of the
exception. And print it out in the message.
My extra information: error at line 1 offset 2
<head>
^
[bin]
I tried to print it out by using parser.getpos() but it
returns values which do not correspond to the error.
How do I determine this at runtime?
testcase that reproduces this problem attached.
|
|
Date |
User |
Action |
Args |
2007-08-23 14:27:21 | admin | link | issue1063229 messages |
2007-08-23 14:27:21 | admin | create | |
|