Merge lp:~ted/indicator-appmenu/lp921288 into lp:indicator-appmenu/0.4

Proposed by Ted Gould
Status: Merged
Merged at revision: 156
Proposed branch: lp:~ted/indicator-appmenu/lp921288
Merge into: lp:indicator-appmenu/0.4
Diff against target: 25 lines (+2/-2)
2 files modified
src/hud-dump-application.c (+1/-1)
src/hud-service.c (+1/-1)
To merge this branch: bzr merge lp:~ted/indicator-appmenu/lp921288
Reviewer Review Type Date Requested Status
Lars Karlitski (community) Approve
Review via email: mp+92200@code.launchpad.net

Description of the change

Make an error a warning so we don't get apport bugs.

To post a comment you must log in.
Revision history for this message
Lars Karlitski (larsu) wrote :

There are more g_error() calls in there which shouldn't be fatal:

$ grep 'g_error\>' -r src/*
src/hud-dbus.c: g_error("Unable to parse HUD interface: %s", error->message);
src/hud-dbus.c: g_error("Unable to find interface '" DBUS_IFACE "'");
src/hud-dump-application.c: g_error("Usage: %s <desktop file path> [gettext domain]\n", argc[0]);

I think we should also replace those before merging.

review: Needs Fixing
Revision history for this message
Ted Gould (ted) wrote :

On Thu, 2012-02-09 at 06:54 +0000, Lars Uebernickel wrote:
> src/hud-dbus.c: g_error("Unable to parse HUD interface: %s", error->message);
> src/hud-dbus.c: g_error("Unable to find interface '" DBUS_IFACE "'");

I actually think these should be fatal. Considering the interface is
compiled in at built time... they *really* shouldn't fail. I'd like to
have the test suite fail in those cases.

> src/hud-dump-application.c: g_error("Usage: %s <desktop file path> [gettext domain]\n", argc[0]);

Yup, should print on STDERR not be an error. r157

lp:~ted/indicator-appmenu/lp921288 updated
157. By Ted Gould

Printing on STDERR not causing an error. Oops.

Revision history for this message
Lars Karlitski (larsu) wrote :

Great, works for me ;)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/hud-dump-application.c'
2--- src/hud-dump-application.c 2012-01-25 05:21:19 +0000
3+++ src/hud-dump-application.c 2012-02-09 14:24:25 +0000
4@@ -26,7 +26,7 @@
5 main (int argv, char * argc[])
6 {
7 if (argv != 2 && argv != 3) {
8- g_error("Usage: %s <desktop file path> [gettext domain]\n", argc[0]);
9+ g_printerr("Usage: %s <desktop file path> [gettext domain]\n", argc[0]);
10 return 1;
11 }
12
13
14=== modified file 'src/hud-service.c'
15--- src/hud-service.c 2011-12-12 03:05:16 +0000
16+++ src/hud-service.c 2012-02-09 14:24:25 +0000
17@@ -30,7 +30,7 @@
18 static void
19 name_lost_cb (GDBusConnection * connection, const gchar * name, gpointer user_data)
20 {
21- g_error("Unable to get name '%s'", name);
22+ g_warning("Unable to get name '%s'", name);
23 g_main_loop_quit(mainloop);
24 return;
25 }

Subscribers

People subscribed via source and target branches