Remove custom MODULE_NOT_FOUND code check
This commit is contained in:
parent
63b84923ce
commit
48522d4b70
1 changed files with 3 additions and 7 deletions
|
@ -266,15 +266,11 @@ function loadApplicationPackage (packagePath) {
|
||||||
// Run the app.
|
// Run the app.
|
||||||
Module._load(packagePath, module, true)
|
Module._load(packagePath, module, true)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e.code === 'MODULE_NOT_FOUND') {
|
console.error('App threw an error during load')
|
||||||
showErrorMessage('Unable to open Electron app.\n\n' +
|
console.error(e)
|
||||||
`${e.toString()}`)
|
|
||||||
} else {
|
|
||||||
console.error('App threw an error when running', e)
|
|
||||||
throw e
|
throw e
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
function showErrorMessage (message) {
|
function showErrorMessage (message) {
|
||||||
app.focus()
|
app.focus()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue