Added Learn More button
This commit is contained in:
parent
e87ced60e5
commit
25cb0fcbb9
1 changed files with 10 additions and 7 deletions
|
@ -253,13 +253,16 @@ function loadApplicationPackage (packagePath) {
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e.code === 'MODULE_NOT_FOUND') {
|
if (e.code === 'MODULE_NOT_FOUND') {
|
||||||
app.focus()
|
app.focus()
|
||||||
dialog.showErrorBox(
|
dialog.showMessageBox({
|
||||||
'Error opening app',
|
message: 'Error opening app',
|
||||||
'Unable to open or find an Electron app. The docs on how to write an app can be found here:\n' +
|
detail: 'Unable to open or find an Electron app. Click to learn more on how to write an app.\n\n' +
|
||||||
`https://github.com/electron/electron/tree/v${process.versions.electron}/docs
|
`${e.toString()}`,
|
||||||
|
buttons: ['Learn More', 'OK']
|
||||||
${e.toString()}`
|
}, (response) => {
|
||||||
)
|
if (response === 0) {
|
||||||
|
shell.openExternal(`https://github.com/electron/electron/tree/v${process.versions.electron}/docs`)
|
||||||
|
}
|
||||||
|
})
|
||||||
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)
|
||||||
|
|
Loading…
Reference in a new issue