After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 738596 - Either g_dbus_error_new_for_dbus_error() or its documentation is wrong
Either g_dbus_error_new_for_dbus_error() or its documentation is wrong
Status: RESOLVED OBSOLETE
Product: glib
Classification: Platform
Component: gdbus
unspecified
Other Linux
: Normal normal
: ---
Assigned To: David Zeuthen (not reading bugmail)
gtkdev
Depends on:
Blocks:
 
 
Reported: 2014-10-15 21:28 UTC by Dan Winship
Modified: 2018-05-24 17:08 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Dan Winship 2014-10-15 21:28:56 UTC
g_dbus_error_new_for_dbus_error() describes three cases (1. error domain is registered, 2. @dbus_error_name is in the form returned by g_dbus_error_encode_gerror(), 3. anything else). For the second two cases, it explicitly notes "@dbus_error_name is added to the error message such that it can be recovered with g_dbus_error_get_remote_error()." It *does not* say that for the first case, and in fact, g_dbus_error_get_remote_error() is perfectly capable of recovering the D-Bus error name from a registered error domain without the message being prefixed. This all would tend to imply that g_dbus_error_new_for_dbus_error() should not be prefixing the error message in the registered-error-domain case.

But it does. At first I assumed that this was a bug, and wrote a patch, but then "make check" fails because gio/tests/gdbus-error.c actually explicitly verifies the current behavior. So maybe its the docs that are wrong, and that functionality was decided against? (And/or, we're stuck with that behavior now for compatibility reasons?)
Comment 1 GNOME Infrastructure Team 2018-05-24 17:08:39 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/944.