Instead of going down with a for the user inexplicable backtrace,
emit a warning asking said user to file a bug including the
comment block in question.
Thanks to Alexandre Rostovtsev <tetromino@gentoo.org> for
proposing something similar in bug #690850
https://bugzilla.gnome.org/show_bug.cgi?id=690850
comment_blocks = {}
for comment in comments:
- comment_block = self.parse_comment_block(comment)
+ try:
+ comment_block = self.parse_comment_block(comment)
+ except Exception:
+ message.warn('unrecoverable parse error, please file a GObject-Introspection '
+ 'bug report including the complete comment block at the '
+ 'indicated location.', message.Position(comment[1], comment[2]))
+ continue
if comment_block is not None:
# Note: previous versions of this parser did not check