稳定测试版
This commit is contained in:
11
main/utils/guard.js
Normal file
11
main/utils/guard.js
Normal file
@@ -0,0 +1,11 @@
|
||||
// main/utils/guard.js
|
||||
const { app } = require('electron')
|
||||
|
||||
function setupGuards() {
|
||||
process.on('uncaughtException', (error) => console.error('uncaughtException:', error))
|
||||
process.on('unhandledRejection', (reason) => console.error('unhandledRejection:', reason))
|
||||
app.on('web-contents-created', (_, contents) => {
|
||||
contents.on('render-process-gone', (_e, details) => console.error('渲染崩溃:', details))
|
||||
})
|
||||
}
|
||||
module.exports = { setupGuards }
|
||||
Reference in New Issue
Block a user