Commit aabebde3 authored by Georg Brandl's avatar Georg Brandl

Closes #20235: Report file and line on unexpected exceptions in Argument Clinic.

parent bac7793b
......@@ -21,6 +21,7 @@ import shlex
import sys
import tempfile
import textwrap
import traceback
# TODO:
#
......@@ -1082,7 +1083,11 @@ class Clinic:
assert dsl_name in parsers, "No parser to handle {!r} block.".format(dsl_name)
self.parsers[dsl_name] = parsers[dsl_name](self)
parser = self.parsers[dsl_name]
parser.parse(block)
try:
parser.parse(block)
except Exception:
fail('Exception raised during parsing:\n' +
traceback.format_exc().rstrip())
printer.print_block(block)
return printer.f.getvalue()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment