Better Sentry implementation.

This commit is contained in:
Quentin DECAUNES 2019-07-25 13:51:32 +02:00
parent 36a2e72fe8
commit f6e8d09522
3 changed files with 9 additions and 2 deletions

View File

@ -1,5 +1,8 @@
ready(function(){
Sentry.init({ dsn: 'https://f80fd3ea297141a8bdc04ce812762f39@sentry.io/1513427' });
Sentry.init({
dsn: 'https://f80fd3ea297141a8bdc04ce812762f39@sentry.io/1513427',
release: require('./package.json').version,
});
const settings = require('electron-settings');
const fixPath = require('fix-path');
document.isStarting = true;
@ -60,6 +63,7 @@ function applyRyzenSettings() {
} catch (error) {
notification('danger', `Unknown option "${option}".`);
appendLog(`applyRyzenSettings(): ${error}`);
Sentry.captureException(new Error(`applyRyzenSettings(): ${error}`));
}
if (options_data[option_name].ryzenadj_value_convert) {
value = ryzenAdjConvert[
@ -84,6 +88,7 @@ function applyRyzenSettings() {
return setTimeout(applyRyzenSettings, 500);
}
notification('danger', err + '<br/>' + output);
Sentry.captureException(new Error(err + ' - ' + output));
}
else if (output) {
notification('success', 'Ryzenadj output:<br/>' + output);

View File

@ -444,6 +444,7 @@ function recreateShortcut() {
});
} catch (error) {
appendLog(`recreateShortcut() ${error}`);
Sentry.captureException(`recreateShortcut() ${error}`);
}
}
}

View File

@ -23,7 +23,8 @@ function preset_import() {
presetsToBeImported = JSON.parse(presetsToBeImported);
} catch (e) {
notification('danger', 'Unable to import presets, malformed data.');
console.error(e);
appendLog(`preset_import() ${e}`);
Sentry.captureException(`recreateShortcut() ${e}`);
return;
}