From: Michal Privoznik <mprivozn@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: lcapitulino@redhat.com, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH v2] qapi/qmp-dispatch: Fix error class for reporting disabled commands
Date: Fri, 13 Sep 2019 15:52:15 +0200 [thread overview]
Message-ID: <e57985a8-6974-e2b4-a622-3b7eca50660c@redhat.com> (raw)
In-Reply-To: <87k1accq91.fsf@dusky.pond.sub.org>
On 9/13/19 2:52 PM, Markus Armbruster wrote:
> Michal Privoznik <mprivozn@redhat.com> writes:
>
>> If a command is disabled an error is reported. But due to usage
>> of error_setg() the class of the error is GenericError which does
>> not help callers in distinguishing this case from a case where a
>> qmp command fails regularly due to other reasons. Use
>> CommandNotFound error class which is much closer to the actual
>> root cause.
>>
>> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
>> ---
>
> I'd like to tweak the commit message a bit:
>
> qmp-dispatch: Use CommandNotFound error for disabled commands
>
> If a command is disabled an error is reported. But due to usage of
> error_setg() the class of the error is GenericError which does not
> help callers in distinguishing this case from a case where a qmp
> command fails regularly due to other reasons.
>
> We used to use class CommandDisabled until the great error
> simplification (commit de253f1491 for QMP and commit 93b91c59db for
> qemu-ga, both v1.2.0).
>
> Use CommandNotFound error class, which is close enough.
>
> Objections?
>
None, thanks for taking care of this.
Michal
next prev parent reply other threads:[~2019-09-13 13:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-30 13:29 [Qemu-devel] [PATCH v2] qapi/qmp-dispatch: Fix error class for reporting disabled commands Michal Privoznik
2019-08-30 13:49 ` Eric Blake
2019-09-13 12:52 ` Markus Armbruster
2019-09-13 13:52 ` Michal Privoznik [this message]
2019-09-13 18:41 ` Markus Armbruster
2019-09-24 12:33 ` Markus Armbruster
2019-09-24 14:45 ` 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=e57985a8-6974-e2b4-a622-3b7eca50660c@redhat.com \
--to=mprivozn@redhat.com \
--cc=armbru@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=mdroth@linux.vnet.ibm.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).