mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
better error handling in case of loader error in tests
This commit is contained in:
parent
59e50ff799
commit
18dfdcbf52
|
@ -100,6 +100,13 @@ function parseReporterOption(value) {
|
|||
|
||||
app.on('ready', () => {
|
||||
|
||||
ipcMain.on('error', (_, err) => {
|
||||
if (!argv.debug) {
|
||||
console.error(err);
|
||||
app.exit(1);
|
||||
}
|
||||
});
|
||||
|
||||
const win = new BrowserWindow({
|
||||
height: 600,
|
||||
width: 800,
|
||||
|
|
|
@ -273,5 +273,12 @@ function runTests(opts) {
|
|||
|
||||
ipcRenderer.on('run', (e, opts) => {
|
||||
initLoader(opts);
|
||||
runTests(opts).catch(err => console.error(typeof err === 'string' ? err : JSON.stringify(err)));
|
||||
runTests(opts).catch(err => {
|
||||
if (!(typeof err !== 'string')) {
|
||||
err = JSON.stringify(err);
|
||||
}
|
||||
|
||||
console.error(err);
|
||||
ipcRenderer.send('error', err);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue