All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: "Lluís Vilanova" <vilanova@ac.upc.edu>
Cc: "Benoît Canet" <benoit.canet@irqsave.net>,
	qemu-devel@nongnu.org, "Luiz Capitulino" <lcapitulino@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v8 2/4] qapi: [trivial] Show full exception message in "test-qapi.py"
Date: Fri, 11 Apr 2014 17:37:13 +0200	[thread overview]
Message-ID: <87d2gnx4gm.fsf@blackfin.pond.sub.org> (raw)
In-Reply-To: <20140402151611.8123.436.stgit@fimbulvetr.bsc.es> ("Lluís Vilanova"'s message of "Wed, 2 Apr 2014 17:16:11 +0200")

Lluís Vilanova <vilanova@ac.upc.edu> writes:

> Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
> ---
>  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.

  reply	other threads:[~2014-04-11 15:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-02 15:15 [Qemu-devel] [PATCH v8 0/4] qapi: Allow modularization of QAPI schema files Lluís Vilanova
2014-04-02 15:16 ` [Qemu-devel] [PATCH v8 1/4] qapi: [trivial] Break long command lines Lluís Vilanova
2014-04-11 15:42   ` Eric Blake
2014-04-02 15:16 ` [Qemu-devel] [PATCH v8 2/4] qapi: [trivial] Show full exception message in "test-qapi.py" Lluís Vilanova
2014-04-11 15:37   ` Markus Armbruster [this message]
2014-04-11 19:09     ` Lluís Vilanova
2014-04-02 15:16 ` [Qemu-devel] [PATCH v8 3/4] qapi: Use an explicit input file Lluís Vilanova
2014-04-11 15:57   ` Eric Blake
2014-04-02 15:16 ` [Qemu-devel] [PATCH v8 4/4] qapi: Add a primitive to include other files from a QAPI schema file Lluís Vilanova
2014-04-11 18:03   ` Eric Blake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d2gnx4gm.fsf@blackfin.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=benoit.canet@irqsave.net \
    --cc=lcapitulino@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=vilanova@ac.upc.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.