mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Quit when get uncaughtException in specs.
This commit is contained in:
@@ -32,10 +32,13 @@ ipc.on('echo', function(event, msg) {
|
||||
event.returnValue = msg;
|
||||
});
|
||||
|
||||
process.on('uncaughtException', function(error) {
|
||||
console.log(error);
|
||||
window.openDevTools();
|
||||
});
|
||||
if (process.argv[1] == '--ci') {
|
||||
process.removeAllListeners('uncaughtException');
|
||||
process.on('uncaughtException', function(error) {
|
||||
console.error(error, error.stack);
|
||||
process.exit(1);
|
||||
});
|
||||
}
|
||||
|
||||
app.on('window-all-closed', function() {
|
||||
app.quit();
|
||||
|
||||
Reference in New Issue
Block a user