This is the only callsite.
We drop use of localerror.name here, because it's not actually useful
to us: rather than the parameter name which received an invalid value
(which was assumed), it's actually the the dbus errno equivalent.
Just use the error string.
Acked-by: Eric Blake <eblake@redhat.com>
error ? error : &localerror))) {
if (error)
ret = 0;
- else
- virReportDBusServiceError(localerror.message ? localerror.message : "unknown error",
- localerror.name);
+ else {
+ virReportError(VIR_ERR_DBUS_SERVICE, "%s",
+ localerror.message ? localerror.message : _("unknown error"));
+ }
goto cleanup;
}
0, 0, \
(fmt), __VA_ARGS__)
-# define virReportDBusServiceError(message, name) \
- virRaiseErrorFull(__FILE__, __FUNCTION__, __LINE__, \
- VIR_FROM_THIS, \
- VIR_ERR_DBUS_SERVICE, \
- VIR_ERR_ERROR, \
- __FUNCTION__, \
- name, \
- NULL, \
- 0, 0, \
- "%s", message);
-
# define virReportUnsupportedError() \
virReportErrorHelper(VIR_FROM_THIS, VIR_ERR_NO_SUPPORT, \
__FILE__, __FUNCTION__, __LINE__, __FUNCTION__)