qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2] qapi/qmp-dispatch: Fix error class for repor


From: Michal Privoznik
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
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

On 9/13/19 2:52 PM, Markus Armbruster wrote:
Michal Privoznik <address@hidden> 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 <address@hidden>
---

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



reply via email to

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