[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Questionable aspects of QEMU Error's design
|
From: |
Eduardo Habkost |
|
Subject: |
Re: Questionable aspects of QEMU Error's design |
|
Date: |
Mon, 6 Apr 2020 11:38:10 -0300 |
On Mon, Apr 06, 2020 at 11:05:36AM -0300, Eduardo Habkost wrote:
> On Sat, Apr 04, 2020 at 12:59:27PM +0200, Markus Armbruster wrote:
[...]
> > Paolo, Daniel, Eduardo,
> >
> > Please pick one for QOM:
>
> Replying this without reading the whole discussion and context:
>
> >
> > * Do nothing. Looks like
> >
> > object_property_set_bool(..., &err);
> > if (err) {
> > error_propagate(errp, err);
> > return;
> > }
> >
> > * Return true on success, false on error. Looks like
> >
>
> I prefer this one.
My weird quoting choice was probably confusing, so for the sake
of clarity: I prefer the "Return true on success, false on error"
option.
>
> > if (!object_property_set_bool(..., errp)) {
> > return;
> > }
> >
> > * Return 0 on success, -1 on error. Looks like
> >
> > if (object_property_set_bool(..., errp) < 0) {
> > return;
> > }
> >
> > This is slightly more likely to require line wrapping than the
> > previous one.
>
> --
> Eduardo
--
Eduardo
Re: Questionable aspects of QEMU Error's design, Markus Armbruster, 2020/04/04
Re: Questionable aspects of QEMU Error's design, Markus Armbruster, 2020/04/27