While writing the D-Bus Properties mixin for telepathy-glib, I wanted to raise org.freedesktop.DBus.Error.InvalidArgs, and assumed that this would work: if (prop_impl == NULL) { GError e = { DBUS_GERROR, DBUS_GERROR_INVALID_ARGS, "Unknown property" }; dbus_g_method_return_error (context, &e); return; } Unfortunately, dbus_g_method_return_error will assert in this case - it assumes that (error->domain == DBUS_GERROR) implies (error->code == DBUS_GERROR_REMOTE_EXCEPTION), which is untrue.
Created attachment 20672 [details] [review] Two git-am patches (implementation and regression test) Also available from: http://git.collabora.co.uk/?p=user/smcv/dbus-glib-smcv.git;a=shortlog;h=refs/heads/16776 git://git.collabora.co.uk/git/user/smcv/dbus-glib-smcv.git
I've rebased this patch on current git master. Could someone review, please? http://git.collabora.co.uk/?p=user/smcv/dbus-glib-smcv.git;a=shortlog;h=refs/heads/16776
Colin, any chance you could have a look at this?
The git-am patches above should still be applicable. Also available in gitweb at: http://git.collabora.co.uk/?p=user/smcv/dbus-glib-smcv.git;a=shortlog;h=refs/heads/16776-make-dbus-errors-throwable This patch can be pulled from: git://git.collabora.co.uk/git/user/smcv/dbus-glib-smcv.git 16776-make-dbus-errors-throwable.
Looks OK to me. Unfortunate we need to have the reverse dbus/gerror mapping but it seems relatively unavoidable. Please commit.
Pushed, thanks.
Fixed in 0.82, according to Colin's release mail.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.