qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH 3/3] monitor: Convert do_migrate() to QError


From: Luiz Capitulino
Subject: [Qemu-devel] Re: [PATCH 3/3] monitor: Convert do_migrate() to QError
Date: Thu, 25 Mar 2010 14:49:21 -0300

On Thu, 25 Mar 2010 18:37:25 +0100
Markus Armbruster <address@hidden> 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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]