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 687185 - org.gtk.Actions.Describe doesn't return an error for non-existing action names
org.gtk.Actions.Describe doesn't return an error for non-existing action names
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gapplication
unspecified
Other Linux
: Normal minor
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2012-10-30 11:13 UTC by Lars Karlitski
Modified: 2013-10-29 01:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
exporter: give error on Describe of missing action (1.24 KB, patch)
2013-10-28 21:50 UTC, Allison Karlitskaya (desrt)
committed Details | Review

Description Lars Karlitski 2012-10-30 11:13:14 UTC
It's a private d-bus interface, but returning an error would be nice for debugging.
Comment 1 Matthias Clasen 2012-11-10 03:02:11 UTC
would be nice, but a little hard to do - all those activate functions return void.
Comment 2 Allison Karlitskaya (desrt) 2013-10-28 21:43:03 UTC
No problem to use exceptions here.  I'll cook a patch.
Comment 3 Allison Karlitskaya (desrt) 2013-10-28 21:50:42 UTC
Created attachment 258352 [details] [review]
exporter: give error on Describe of missing action

If someone calls org.gtk.Actions.Describe on a non-existent action then
return an exception instead of a trivial description (disabled, no
state, etc.).
Comment 4 Lars Karlitski 2013-10-28 23:59:48 UTC
Review of attachment 258352 [details] [review]:

::: gio/gactiongroupexporter.c
@@ +385,3 @@
+        {
+          g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS,
+                                                 "The named action does not exist.");

Including the name of the action would probably make it easier to debug apps.