| Summary: | [fixed in git] dbus_g_method_return_error should accept all DBUS_GERROR_* | ||
|---|---|---|---|
| Product: | dbus | Reporter: | Simon McVittie <smcv> |
| Component: | GLib | Assignee: | Rob Taylor <rob.taylor> |
| Status: | RESOLVED FIXED | QA Contact: | John (J5) Palmieri <johnp> |
| Severity: | enhancement | ||
| Priority: | medium | CC: | walters |
| Version: | unspecified | Keywords: | patch |
| Hardware: | Other | ||
| OS: | All | ||
| Whiteboard: | |||
| i915 platform: | i915 features: | ||
| Attachments: | Two git-am patches (implementation and regression test) | ||
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.
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.