Commit 321f74d8 authored by Dominik Beyer's avatar Dominik Beyer
Browse files

[BUGFIX] Prevent errors on failing system notification

parent 32620a7a
......@@ -84,6 +84,7 @@ module.exports = class Logger {
*/
static displayNotification(_title, _message, _options = {wait: false, timeout: 5000}) {
let icon = _options.icon ? _options.icon : 'SGC.svg';
try {
if (process.platform === 'linux') {
let notification = freedesktopNotifier.createNotification({
summary: _title,
......@@ -118,6 +119,9 @@ module.exports = class Logger {
});
}
}
} catch (e) {
Logger.info('Your operating system does not seem to support desktop notifications.');
}
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment