feat: add stack trace log to preload script error handling (#18905)

* Add console.trace to preload script error handling

* Log error directly instead of error string + trace

* Log full error object instead of error message
This commit is contained in:
Ian Sanders 2019-07-15 00:54:33 -04:00 committed by Shelley Vohr
parent e6e94fc59d
commit 079a173a72
2 changed files with 2 additions and 2 deletions

View file

@ -200,7 +200,7 @@ for (const preloadScript of preloadScripts) {
Module._load(preloadScript)
} catch (error) {
console.error(`Unable to load preload script: ${preloadScript}`)
console.error(`${error}`)
console.error(error)
ipcRendererInternal.send('ELECTRON_BROWSER_PRELOAD_ERROR', preloadScript, errorUtils.serialize(error))
}

View file

@ -166,7 +166,7 @@ for (const { preloadPath, preloadSrc, preloadError } of preloadScripts) {
}
} catch (error) {
console.error(`Unable to load preload script: ${preloadPath}`)
console.error(`${error}`)
console.error(error)
ipcRendererInternal.send('ELECTRON_BROWSER_PRELOAD_ERROR', preloadPath, errorUtils.serialize(error))
}