From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: mst@redhat.com, qemu-devel@nongnu.org,
Michael Roth <mdroth@linux.vnet.ibm.com>,
Luiz Capitulino <lcapitulino@redhat.com>,
Anthony Liguori <anthony@codemonkey.ws>,
pbonzini@redhat.com, lersek@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 6/7] error: Revamp interface documentation
Date: Wed, 29 Jul 2015 19:32:17 +0100 [thread overview]
Message-ID: <20150729183216.GO2267@work-vm> (raw)
In-Reply-To: <87pp3bjuld.fsf@blackfin.pond.sub.org>
* Markus Armbruster (armbru@redhat.com) wrote:
> "Dr. David Alan Gilbert" <dgilbert@redhat.com> writes:
>
> > * Markus Armbruster (armbru@redhat.com) wrote:
> >> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> >> Reviewed-by: Eric Blake <eblake@redhat.com>
> >> ---
> >> include/qapi/error.h | 177 ++++++++++++++++++++++++++++++++++++---------------
> >> 1 file changed, 127 insertions(+), 50 deletions(-)
> >>
> >> diff --git a/include/qapi/error.h b/include/qapi/error.h
> >> index 8c3a7dd..7d808e8 100644
> >> --- a/include/qapi/error.h
> >> +++ b/include/qapi/error.h
> >> @@ -2,13 +2,75 @@
> >> * QEMU Error Objects
> >> *
> >> * Copyright IBM, Corp. 2011
> >> + * Copyright (C) 2011-2015 Red Hat, Inc.
> >> *
> >> * Authors:
> >> * Anthony Liguori <aliguori@us.ibm.com>
> >> + * Markus Armbruster <armbru@redhat.com>
> >> *
> >> * This work is licensed under the terms of the GNU LGPL, version 2. See
> >> * the COPYING.LIB file in the top-level directory.
> >> */
> >> +
> >> +/*
> >> + * Error reporting system loosely patterned after Glib's GError.
> >
> > Excellent; it's great to have this documented.
>
> Thanks!
>
> > Do we have a note anywhere that says why we don't just use GError?
>
> I'm not aware of such a note, and I don't know / remember why we didn't
> use GError. Perhaps one of the guys signing off the initial commit
> does (cc'ing them):
>
> commit d5ec4f27c387c3b3200abb8656343b2519ea3047
> Author: Luiz Capitulino <lcapitulino@redhat.com>
> Date: Wed Jun 1 12:14:49 2011 -0500
>
> Introduce the new error framework
>
> New error-handling framework that allows for exception-like error
> propagation.
>
> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
>
> Here's a possible clue:
>
> GLib is an extremely common library that has a portable thread implementatiocommit e18df14185e817ba735bce57ecdef9a55fb3d093
> Author: Anthony Liguori <aliguori@us.ibm.com>
> Date: Tue Jul 19 14:50:29 2011 -0500
>
> Add hard build dependency on glib
> [...]
> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
> Signed-off-by: Luiz Capitulino <lcapitulino@gmail.com>
>
> Error predates our use of GLib.
By a month!
Are there semantics close enough that we could typedef Error to GError and then
slowly replace the use of our functions with standard glib calls?
It would just end up as one chunk less of code to maintain, and
something that new people wouldn't have to learn if they already new glib.
Dave
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2015-07-29 18:32 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-23 14:01 [Qemu-devel] [PATCH v2 0/7] error: On abort, report where the error was created Markus Armbruster
2015-07-23 14:01 ` [Qemu-devel] [PATCH v2 1/7] error: De-duplicate code creating Error objects Markus Armbruster
2015-07-23 14:38 ` Eric Blake
2015-07-24 8:59 ` Markus Armbruster
2015-07-23 14:01 ` [Qemu-devel] [PATCH v2 2/7] error: Make error_setg() a function Markus Armbruster
2015-07-23 14:01 ` [Qemu-devel] [PATCH v2 3/7] qga: Clean up unnecessarily dirty casts Markus Armbruster
2015-07-23 14:01 ` [Qemu-devel] [PATCH v2 4/7] qga/vss-win32: Document the DLL requires non-null errp Markus Armbruster
2015-07-23 14:01 ` [Qemu-devel] [PATCH v2 5/7] error: error_set_errno() is unused, drop Markus Armbruster
2015-07-23 14:01 ` [Qemu-devel] [PATCH v2 6/7] error: Revamp interface documentation Markus Armbruster
2015-07-28 11:31 ` Dr. David Alan Gilbert
2015-07-29 7:23 ` Markus Armbruster
2015-07-29 18:32 ` Dr. David Alan Gilbert [this message]
2015-07-30 6:58 ` Markus Armbruster
2015-07-23 14:01 ` [Qemu-devel] [PATCH v2 7/7] error: On abort, report where the error was created Markus Armbruster
2015-07-23 14:47 ` Eric Blake
2015-07-24 8:14 ` Laszlo Ersek
2015-07-24 9:02 ` Markus Armbruster
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=20150729183216.GO2267@work-vm \
--to=dgilbert@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=armbru@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=lersek@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=mst@redhat.com \
--cc=pbonzini@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).