anru/rsted — Issue #4: When I make mistake on rst content, it hangs
Author: dlintw
Created: 2011-10-21 22:55:42+00:00
State: open

For example.
SystemMessage: :3: (SEVERE/4) Title overline & underline mismatch.

Traceback (most recent call last)
File "/usr/lib/python2.7/site-packages/flask/app.py", line 1518, in __call__
return self.wsgi_app(environ, start_response)
File "/usr/lib/python2.7/site-packages/flask/app.py", line 1506, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/usr/lib/python2.7/site-packages/flask/app.py", line 1504, in wsgi_app
response = self.full_dispatch_request()
File "/usr/lib/python2.7/site-packages/flask/app.py", line 1264, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/lib/python2.7/site-packages/flask/app.py", line 1262, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/lib/python2.7/site-packages/flask/app.py", line 1248, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/dlin/tools/rsted/application.py", line 60, in rst2html
html = _rst2html(rst, theme=theme)
File "/home/dlin/tools/rsted/rsted/html.py", line 32, in rst2html
out = publish_string(rst, writer_name='html', settings_overrides=rst_opts)
File "/usr/lib/python2.7/site-packages/docutils/core.py", line 401, in publish_string
enable_exit_status=enable_exit_status)
File "/usr/lib/python2.7/site-packages/docutils/core.py", line 649, in publish_programmatically
output = pub.publish(enable_exit_status=enable_exit_status)
File "/usr/lib/python2.7/site-packages/docutils/core.py", line 211, in publish
self.settings)
File "/usr/lib/python2.7/site-packages/docutils/readers/__init__.py", line 69, in read
self.parse()
File "/usr/lib/python2.7/site-packages/docutils/readers/__init__.py", line 75, in parse
self.parser.parse(self.input, document)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/__init__.py", line 157, in parse
self.statemachine.run(inputlines, document, inliner=self.inliner)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 170, in run
input_source=document['source'])
File "/usr/lib/python2.7/site-packages/docutils/statemachine.py", line 237, in run
context, state, transitions)
File "/usr/lib/python2.7/site-packages/docutils/statemachine.py", line 458, in check_line
return method(match, context, next_state)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 2926, in text
source=src, line=srcline-1)
File "/usr/lib/python2.7/site-packages/docutils/utils.py", line 232, in severe
return self.system_message(self.SEVERE_LEVEL, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/docutils/utils.py", line 190, in system_message
raise SystemMessage(msg, level)
SystemMessage: :3: (SEVERE/4) Title overline & underline mismatch. ============== My Section Content =============