diff options
author | James Booth <boothj5@gmail.com> | 2012-09-24 21:03:05 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2012-09-24 21:03:05 +0100 |
commit | 79796ca12951066665f28df5ca9881997c9fe994 (patch) | |
tree | f419af0ef86211f17001acc3966ba6c65a8242ac | |
parent | ff7174db09e9f6687a9fd88bba80fa89e889f2d1 (diff) | |
download | profani-tty-79796ca12951066665f28df5ca9881997c9fe994.tar.gz |
Handle notification errors
-rw-r--r-- | src/windows.c | 8 |
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."); } |