Received: from eggs.gnu.org ([2001:4830:134:3::10]:57050) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WYgpR-0008Bo-14 for qemu-devel@nongnu.org; Fri, 11 Apr 2014 15:09:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WYgpK-0002Y4-NH for qemu-devel@nongnu.org; Fri, 11 Apr 2014 15:09:32 -0400 Received: from roura.ac.upc.es ([147.83.33.10]:48098) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WYgpK-0002XO-CT for qemu-devel@nongnu.org; Fri, 11 Apr 2014 15:09:26 -0400 From: =?utf-8?Q?Llu=C3=ADs_Vilanova?= References: <20140402151558.8123.58942.stgit@fimbulvetr.bsc.es> <20140402151611.8123.436.stgit@fimbulvetr.bsc.es> <87d2gnx4gm.fsf@blackfin.pond.sub.org> Date: Fri, 11 Apr 2014 21:09:21 +0200 In-Reply-To: <87d2gnx4gm.fsf@blackfin.pond.sub.org> (Markus Armbruster's message of "Fri, 11 Apr 2014 17:37:13 +0200") Message-ID: <8761mffztq.fsf@fimbulvetr.bsc.es> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v8 2/4] qapi: [trivial] Show full exception message in "test-qapi.py" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: =?utf-8?Q?Beno=C3=AEt?= Canet , qemu-devel@nongnu.org, Luiz Capitulino Works for me. I'll send a new series next week with this and Eric's correct= ions. Lluis Markus Armbruster writes: > Llu=C3=ADs Vilanova writes: >> Signed-off-by: Llu=C3=ADs Vilanova >> --- >> tests/qapi-schema/test-qapi.py | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >>=20 >> diff --git a/tests/qapi-schema/test-qapi.py b/tests/qapi-schema/test-qap= i.py >> index b3d1e1d..ac6da13 100644 >> --- a/tests/qapi-schema/test-qapi.py >> +++ b/tests/qapi-schema/test-qapi.py >> @@ -18,8 +18,8 @@ try: >> exprs =3D parse_schema(sys.stdin) >> except SystemExit: >> raise >> -except: >> - print >>sys.stderr, "Crashed:", sys.exc_info()[0] >> +except Exception, e: >> + print >>sys.stderr, "Crashed:", str(e) >> exit(1) >>=20 >> pprint(exprs) > This still hides information necessary to debug the crash. Let's just > not catch these exceptions. --=20 "And it's much the same thing with knowledge, for whenever you learn something new, the whole world becomes that much richer." -- The Princess of Pure Reason, as told by Norton Juster in The Phantom Tollbooth