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:
parent
e6e94fc59d
commit
079a173a72
2 changed files with 2 additions and 2 deletions
|
@ -200,7 +200,7 @@ for (const preloadScript of preloadScripts) {
|
||||||
Module._load(preloadScript)
|
Module._load(preloadScript)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(`Unable to load preload script: ${preloadScript}`)
|
console.error(`Unable to load preload script: ${preloadScript}`)
|
||||||
console.error(`${error}`)
|
console.error(error)
|
||||||
|
|
||||||
ipcRendererInternal.send('ELECTRON_BROWSER_PRELOAD_ERROR', preloadScript, errorUtils.serialize(error))
|
ipcRendererInternal.send('ELECTRON_BROWSER_PRELOAD_ERROR', preloadScript, errorUtils.serialize(error))
|
||||||
}
|
}
|
||||||
|
|
|
@ -166,7 +166,7 @@ for (const { preloadPath, preloadSrc, preloadError } of preloadScripts) {
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(`Unable to load preload script: ${preloadPath}`)
|
console.error(`Unable to load preload script: ${preloadPath}`)
|
||||||
console.error(`${error}`)
|
console.error(error)
|
||||||
|
|
||||||
ipcRendererInternal.send('ELECTRON_BROWSER_PRELOAD_ERROR', preloadPath, errorUtils.serialize(error))
|
ipcRendererInternal.send('ELECTRON_BROWSER_PRELOAD_ERROR', preloadPath, errorUtils.serialize(error))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue