insomnia/app/main/error-handling.js
Gregory Schier 7b8d26c292 Added import from URI ability (#160)
* Added import from URI ability

* Add protocol handlers

* Fix for keymap setting on read-only mode

* Refactored some main components out

* Protocols shoudl work now
2017-05-03 10:48:23 -07:00

29 lines
641 B
JavaScript

import Raven from 'raven';
import {getAppVersion, isDevelopment} from '../common/constants';
export function init () {
_initSentry();
}
function _initSentry () {
let ravenClient = null;
if (!isDevelopment()) {
ravenClient = Raven.config('https://786e43ae199c4757a9ea4a48a9abd17d@sentry.io/109702', {
environment: isDevelopment() ? 'development' : 'production',
release: getAppVersion(),
logger: 'electron.main'
});
ravenClient.install();
}
process.on('uncaughtException', e => {
if (ravenClient) {
ravenClient.captureException(e, {});
} else {
console.error(e);
}
});
}