about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2012-09-24 21:03:05 +0100
committerJames Booth <boothj5@gmail.com>2012-09-24 21:03:05 +0100
commit79796ca12951066665f28df5ca9881997c9fe994 (patch)
treef419af0ef86211f17001acc3966ba6c65a8242ac /src
parentff7174db09e9f6687a9fd88bba80fa89e889f2d1 (diff)
downloadprofani-tty-79796ca12951066665f28df5ca9881997c9fe994.tar.gz
Handle notification errors
Diffstat (limited to 'src')
-rw-r--r--src/windows.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/windows.c b/src/windows.c
index 0aa9ab6a..f6b230ac 100644
--- a/src/windows.c
+++ b/src/windows.c
@@ -309,7 +309,13 @@ _win_notify(const char * const message, int timeout,
         notify_notification_set_urgency(notification, NOTIFY_URGENCY_NORMAL);
 
         GError *error = NULL;
-        notify_notification_show(notification, &error);
+        gboolean notify_success = notify_notification_show(notification, &error);
+
+        if (!notify_success) {
+            log_error("Error sending desktop notification:");
+            log_error("  -> Message : %s", message);
+            log_error("  -> Error   : %s", error->message);
+        }
     } else {
         log_error("Libnotify initialisation error.");
     }