New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The "Error opening app" dialog #5610
Changes from 2 commits
e87ced6
25cb0fc
a1e59b8
b08393a
58d9d2c
ee61a28
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -253,13 +253,16 @@ function loadApplicationPackage (packagePath) { | |
} catch (e) { | ||
if (e.code === 'MODULE_NOT_FOUND') { | ||
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:\n' + | ||
`https://github.com/electron/electron/tree/v${process.versions.electron}/docs | ||
|
||
${e.toString()}` | ||
) | ||
dialog.showMessageBox({ | ||
message: 'Error opening app', | ||
detail: 'Unable to open or find an Electron app. Click to learn more on how to write an app.\n\n' + | ||
`${e.toString()}`, | ||
buttons: ['Learn More', 'OK'] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you'll want to have to OK button be the default selected button instead of Learn More, seems like a more common pattern since the person might know what to do just by seeing the error message and might not want to always learn more. |
||
}, (response) => { | ||
if (response === 0) { | ||
shell.openExternal(`https://github.com/electron/electron/tree/v${process.versions.electron}/docs`) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it might make sense to change this URL to http://electron.atom.io/docs now |
||
} | ||
}) | ||
process.exit(1) | ||
} else { | ||
console.error('App threw an error when running', e) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can now drop the
Click to learn more on how to write an app.
piece of this message.