All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH 3/3] monitor: Convert do_migrate() to QError
Date: Thu, 25 Mar 2010 20:30:33 +0100	[thread overview]
Message-ID: <m3ocicb3mu.fsf@blackfin.pond.sub.org> (raw)
In-Reply-To: <20100325144921.05e4a27c@redhat.com> (Luiz Capitulino's message of "Thu, 25 Mar 2010 14:49:21 -0300")

Luiz Capitulino <lcapitulino@redhat.com> writes:

> On Thu, 25 Mar 2010 18:37:25 +0100
> Markus Armbruster <armbru@redhat.com> wrote:
>
> [...]
>
>> >> @@ -86,12 +86,13 @@ int do_migrate(Monitor *mon, const QDict *qdict, QObject **ret_data)
>> >>                                          (int)qdict_get_int(qdict, "inc"));
>> >>  #endif
>> >>      } else {
>> >> -        monitor_printf(mon, "unknown migration protocol: %s\n", uri);
>> >> +        qerror_report(QERR_INVALID_PARAMETER, "uri");
>> >>          return -1;
>> >>      }
>> >>  
>> >>      if (s == NULL) {
>> >> -        monitor_printf(mon, "migration failed\n");
>> >> +        /* TODO push error reporting into the FOO_start_outgoing_migration() */
>> >> +        qerror_report(QERR_MIGRATION_FAILED);
>> >>          return -1;
>> >>      }
>> >
>> >  I think this one is no better than the automatic UndefinedError
>> > which is going to be triggered. I would only touch this when/if
>> > we get the migration functions converted.
>> 
>> I feel it is a bit better, because:
>> 
>> * It doesn't dilute the nice "this is a bug, and I should report it"
>>   property of UndefinedError.
>> 
>> * It avoids the "returned failure but did not pass an error" message.
>>   Minor, because it's under CONFIG_DEBUG_MONITOR.
>
>  But this is exactly what we want because having QERR_MIGRATION_FAILED
> there doesn't fix the problems those warnings are making us aware of.

Except we are already aware of the problem, and additional warnings are
just noise.

  reply	other threads:[~2010-03-25 19:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-23 18:07 [Qemu-devel] [PATCH 0/3] Convert do_migrate() to QError Markus Armbruster
2010-03-23 18:07 ` [Qemu-devel] [PATCH 1/3] QError: New QERR_MIGRATION_IN_PROGRESS Markus Armbruster
2010-03-23 18:07 ` [Qemu-devel] [PATCH 2/3] QError: New QERR_MIGRATION_FAILED Markus Armbruster
2010-03-23 18:07 ` [Qemu-devel] [PATCH 3/3] monitor: Convert do_migrate() to QError Markus Armbruster
2010-03-24 19:40   ` [Qemu-devel] " Luiz Capitulino
2010-03-25 17:37     ` Markus Armbruster
2010-03-25 17:49       ` Luiz Capitulino
2010-03-25 19:30         ` Markus Armbruster [this message]
2010-03-26 12:31           ` Luiz Capitulino
2010-03-29 12:38             ` Markus Armbruster
2010-03-29 13:31               ` Luiz Capitulino

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=m3ocicb3mu.fsf@blackfin.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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.