mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
7b8d26c292
* 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
29 lines
641 B
JavaScript
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);
|
|
}
|
|
});
|
|
}
|