[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v8 2/4] qapi: [trivial] Show full exception mess
From: |
Lluís Vilanova |
Subject: |
Re: [Qemu-devel] [PATCH v8 2/4] qapi: [trivial] Show full exception message in "test-qapi.py" |
Date: |
Fri, 11 Apr 2014 21:09:21 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Works for me. I'll send a new series next week with this and Eric's corrections.
Lluis
Markus Armbruster writes:
> Lluís Vilanova <address@hidden> writes:
>> Signed-off-by: Lluís Vilanova <address@hidden>
>> ---
>> tests/qapi-schema/test-qapi.py | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/tests/qapi-schema/test-qapi.py b/tests/qapi-schema/test-qapi.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 = 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)
>>
>> pprint(exprs)
> This still hides information necessary to debug the crash. Let's just
> not catch these exceptions.
--
"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