-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
75 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
global.log = require('../app/logger').make('info'); | ||
var child_process = require('child_process'); | ||
|
||
var errorReporter = module.exports = function errorReporter(exception, showError = true) { | ||
setTimeout(function () { | ||
|
@@ -12,16 +13,52 @@ var errorReporter = module.exports = function errorReporter(exception, showError | |
} catch (e) { | ||
log.info(e.message); | ||
} | ||
return; | ||
//return; | ||
} | ||
|
||
console.log("Sending error report"); | ||
console.error(exception); | ||
log.info("Sending error report"); | ||
log.info(`Sending error report ~ ${exception}`); | ||
|
||
var Raven = require('raven'); | ||
Raven.config('https://07fa68e1ac02484e9370fc9f0b77631f:[email protected]/143647', { | ||
logger: 'default' | ||
logger: 'default', | ||
allowSecretKey: true, | ||
transport: { | ||
send(client, message, headers, eventId, cb) { | ||
setTimeout(() => { | ||
try { | ||
var net = require('electron').remote.net; | ||
var request = net.request({ | ||
method: 'POST', | ||
protocol: 'https:', | ||
hostname: client.dsn.host, | ||
path: client.dsn.path + 'api/' + client.dsn.project_id + '/store/', | ||
headers: headers, | ||
port: 443 | ||
}); | ||
|
||
request.on('error', (error) => { | ||
console.error(error); | ||
}); | ||
|
||
request.on('abort', (error) => { | ||
console.error('abort', error); | ||
}); | ||
|
||
request.on('response', (res, a, b) => { | ||
console.log('Error reported'); | ||
}); | ||
|
||
request.end(message); | ||
|
||
window.ERR_REQ = request; | ||
} catch (error) { | ||
console.error(error); | ||
} | ||
}, 100); | ||
} | ||
} | ||
}).install(); | ||
|
||
var electron = require('electron'); | ||
|
@@ -59,7 +96,7 @@ var errorReporter = module.exports = function errorReporter(exception, showError | |
}; | ||
|
||
if (process.platform == "darwin") { | ||
var exec = global.node.child_process.exec; | ||
var exec = child_process.exec; | ||
exec('sw_vers -productVersion', function (err, stdout, stderr) { | ||
extra.system = stdout; | ||
sender(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,8 @@ | |
|
||
|
||
"@types/node@^7.0.18": | ||
version "7.0.43" | ||
resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.43.tgz#a187e08495a075f200ca946079c914e1a5fe962c" | ||
version "7.0.46" | ||
resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.46.tgz#c3dedd25558c676b3d6303e51799abb9c3f8f314" | ||
|
||
abbrev@1: | ||
version "1.1.1" | ||
|
@@ -324,10 +324,6 @@ chromium-pickle-js@^0.2.0: | |
version "0.2.0" | ||
resolved "https://registry.yarnpkg.com/chromium-pickle-js/-/chromium-pickle-js-0.2.0.tgz#04a106672c18b085ab774d983dfa3ea138f22205" | ||
|
||
"classy@github:paxa/classy": | ||
version "0.0.2" | ||
resolved "https://codeload.github.com/paxa/classy/tar.gz/187261e8cfb780018c56198a9cf6904d9a6f3325" | ||
|
||
clean-css@^3.3.0: | ||
version "3.4.28" | ||
resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-3.4.28.tgz#bf1945e82fc808f55695e6ddeaec01400efd03ff" | ||
|
@@ -2015,8 +2011,8 @@ punycode@^1.4.1: | |
resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" | ||
|
||
q@^1.1.2, q@~1.5.0: | ||
version "1.5.0" | ||
resolved "https://registry.yarnpkg.com/q/-/q-1.5.0.tgz#dd01bac9d06d30e6f219aecb8253ee9ebdc308f1" | ||
version "1.5.1" | ||
resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" | ||
|
||
qs@~6.4.0: | ||
version "6.4.0" | ||
|
@@ -2041,8 +2037,8 @@ [email protected]: | |
uuid "3.0.0" | ||
|
||
rc@^1.1.2: | ||
version "1.2.1" | ||
resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.1.tgz#2e03e8e42ee450b8cb3dce65be1bf8974e1dfd95" | ||
version "1.2.2" | ||
resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.2.tgz#d8ce9cb57e8d64d9c7badd9876c7c34cbe3c7077" | ||
dependencies: | ||
deep-extend "~0.4.0" | ||
ini "~1.3.0" | ||
|
@@ -2248,8 +2244,8 @@ rx@^4.1.0: | |
resolved "https://registry.yarnpkg.com/rx/-/rx-4.1.0.tgz#a5f13ff79ef3b740fe30aa803fb09f98805d4782" | ||
|
||
rxjs@^5.1.1: | ||
version "5.4.3" | ||
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.4.3.tgz#0758cddee6033d68e0fd53676f0f3596ce3d483f" | ||
version "5.5.0" | ||
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.0.tgz#26d8f3866eb700e247e0728a147c3d628993d812" | ||
dependencies: | ||
symbol-observable "^1.0.1" | ||
|
||
|