Print real error messages even if it looks like an invalid app

This commit is contained in:
Yeechan Lu 2015-05-29 14:53:32 +08:00 committed by Cheng Zhao
parent 02bdace366
commit c026863d48

View file

@ -53,7 +53,7 @@ if (option.file && !option.webdriver) {
} catch(e) { } catch(e) {
if (e.code == 'MODULE_NOT_FOUND') { if (e.code == 'MODULE_NOT_FOUND') {
app.focus(); app.focus();
dialog.showErrorBox('Error opening app', 'The app provided is not a valid electron app, please read the docs on how to write one:\nhttps://github.com/atom/electron/tree/master/docs'); dialog.showErrorBox('Error opening app', 'The app provided is not a valid electron app, please read the docs on how to write one:\nhttps://github.com/atom/electron/tree/master/docs\n\n' + e.toString());
process.exit(1); process.exit(1);
} else { } else {
console.error('App threw an error when running', e); console.error('App threw an error when running', e);