qmp: switch to the new error format on the wire
IMPORTANT: this BREAKS QMP's compatibility for the error response.
This commit changes QMP's wire protocol to make use of the simplererror format introduced by previous commits.
There are two important (and mostly incompatible) changes:...
qemu-ga: switch to the new error format on the wire
IMPORTANT: this BREAKS qemu-ga compatibility for the error response.
Instead of returning something like:
{ "error": { "class": "InvalidParameterValue", "data": {"name": "mode", "expected": "halt|powerdown|reboot" } } }...
error: drop error_get_qobject()/error_set_qobject()
error_get_qobject() is unused since last commit, error_set_qobject()has never been used. Also drops error_int.h.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Reviewed-by: Markus Armbruster <armbru@redhat.com>
error, qerror: pass desc string to error calls
This commit changes all QERR_ macros to contain a human message (ie.the desc string found in qerr_table[]) instead of a json dictionaryin string format.
Before this commit, error_set() and qerror_report() would receive...
error: drop unused functions
Besides being unused, they operate on the current error format,which is going to be replaced soon.
hmp: hmp_change(): use error_get_class()
The error_is_type() function is going to be dropped.
error: add error_get_class()
qerror: add proper ErrorClass value for QERR_ macros
This commit replaces the place holder value for the ErrorClassargument with a proper ErrorClass value for all QERR_ macros.
All current errors are mapped to GenericError, except for errorsCommandNotFound, DeviceEncrypted, DeviceNotActive, DeviceNotFound,...
error, qerror: add ErrorClass argument to error functions
The new argument is added to functions qerror_report() and error_set().It's stored in Error and QError. qerror_report_err() is also updated totake care of it.
The QERR_ macros are changed to contain a place holder value for the...
qerror: qerror_table: don't use C99 struct initializers
This allows for changing QERR_ macros to initialize two struct membersat the same time. See next commit for more details.
View all revisions | View revisions
Also available in: Atom