From 79796ca12951066665f28df5ca9881997c9fe994 Mon Sep 17 00:00:00 2001 From: James Booth Date: Mon, 24 Sep 2012 21:03:05 +0100 Subject: [PATCH] Handle notification errors --- src/windows.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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."); }