misc: better error logging

This commit is contained in:
bordun 2020-11-09 19:34:31 +01:00
parent 5bd2bbd5ba
commit e9607aad77
6 changed files with 23 additions and 19 deletions

View file

@ -17,10 +17,12 @@ window.onerror = function(msg,url,row,col, error) {
}).join('\n')
console.error(`${msg}\n${stringifiedStack}`)
ipc.send('errorLog', `(ERROR, CLIENT) ${msg}\n${stringifiedStack}`)
}).catch(()=>{
console.error(`${msg}\n at ${url}:${row}:${col}\n (no stacktrace available)`)
ipc.send('errorLog', `(ERROR, CLIENT) ${msg}\n at ${url}:${row}:${col}\n (no stacktrace available)`)
})