From efcff2e4ae6cabaf90fec1d5bd0cec0f5d4a3a4a Mon Sep 17 00:00:00 2001 From: Maxime Dénès Date: Fri, 16 Mar 2018 00:53:57 +0100 Subject: [Sphinx] Better error message for coqtop errors --- doc/tools/coqrst/repl/coqtop.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'doc/tools') diff --git a/doc/tools/coqrst/repl/coqtop.py b/doc/tools/coqrst/repl/coqtop.py index d0e8d5733..efb5cb550 100644 --- a/doc/tools/coqrst/repl/coqtop.py +++ b/doc/tools/coqrst/repl/coqtop.py @@ -70,9 +70,12 @@ class CoqTop: """ # Suppress newlines, but not spaces: they are significant in notations sentence = re.sub(r"[\r\n]+", " ", sentence).strip() - # print("Sending {}".format(sentence)) self.coqtop.sendline(sentence) - output = self.next_prompt() + try: + output = self.next_prompt() + except: + print("Error while sending the following sentence to coqtop: {}".format(sentence)) + raise # print("Got {}".format(repr(output))) return output -- cgit v1.2.3