Skip to content
Newer
Older
100644 18 lines (16 sloc) 412 Bytes
e5b277b @rossburton Refactor die() into util.c, add eds-get-vcard
authored
1 #include <dbus/dbus-glib.h>
2
3 void
4 die (const char *prefix, GError *error)
5 {
6 if (error) {
7 if (error->code == DBUS_GERROR_REMOTE_EXCEPTION) {
8 g_error ("%s: %s (%s)", prefix, error->message, dbus_g_error_get_name (error));
9 } else {
10 g_error ("%s: %s (%d)", prefix, error->message, error->code);
11 }
12 g_error_free (error);
13 } else {
14 g_error (prefix);
15 }
16 g_assert_not_reached ();
17 }
Something went wrong with that request. Please try again.