1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

All: Better handling of startup errors

This commit is contained in:
Laurent Cozic
2018-03-07 19:11:55 +00:00
parent b04d750cec
commit 82e99ca658
5 changed files with 30 additions and 24 deletions

View File

@ -359,18 +359,7 @@ class BaseApplication {
}
async start(argv) {
let startFlags = null;
try {
startFlags = await this.handleStartFlags_(argv);
} catch (error) {
if (error.code == 'flagError') {
console.info(error.message);
console.info(_('Type `joplin help` for usage information.'));
process.exit(1);
}
throw error;
}
let startFlags = await this.handleStartFlags_(argv);
argv = startFlags.argv;
let initArgs = startFlags.matched;