mirror of
https://github.com/abraunegg/onedrive
synced 2024-06-26 17:30:25 +02:00
Add notification error handling
This commit is contained in:
parent
9863e8c889
commit
0f376bcc90
|
@ -99,8 +99,13 @@ class LogBuffer {
|
||||||
shared void notify(string message) {
|
shared void notify(string message) {
|
||||||
// Use dnotify's functionality for GUI notifications, if GUI notifications is enabled
|
// Use dnotify's functionality for GUI notifications, if GUI notifications is enabled
|
||||||
version(Notifications) {
|
version(Notifications) {
|
||||||
|
try {
|
||||||
auto n = new Notification("Log Notification", message, "IGNORED");
|
auto n = new Notification("Log Notification", message, "IGNORED");
|
||||||
n.show();
|
n.show();
|
||||||
|
} catch (NotificationError e) {
|
||||||
|
sendGUINotification = false;
|
||||||
|
addLogEntry("Unable to send notification; disabled in the following: " ~ e.message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue