console: log renderer's error in stderr
This commit is contained in:
parent
e5e7c4bb91
commit
ed85a9d745
2 changed files with 5 additions and 1 deletions
|
|
@ -289,5 +289,9 @@ module.exports = {
|
|||
|
||||
log: function(data) {
|
||||
console.log(data)
|
||||
},
|
||||
|
||||
error: function(data) {
|
||||
console.error(data)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ request.onload = function() {
|
|||
|
||||
window.onerror = function(error,url,row,col) {
|
||||
var data = smc.originalPositionFor({line:row,column:col})
|
||||
ipc.send('log', `[Renderer process error]\n${error}\nSource: ${data.source} @ line ${data.line}`)
|
||||
ipc.send('error', `[Renderer process error]\n${error}\nSource: ${data.source} @ line ${data.line}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue