mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
Fixup 6b6fa94c
: coverity says there are more possible exceptions.
The bulk of the changes is indentation.
This commit is contained in:
parent
6b6fa94c91
commit
c2ed75fd37
13
src/LyX.cpp
13
src/LyX.cpp
@ -471,6 +471,7 @@ void LyX::earlyExit(int status)
|
||||
|
||||
int LyX::init(int & argc, char * argv[])
|
||||
{
|
||||
try {
|
||||
// check for any spurious extra arguments
|
||||
// other than documents
|
||||
for (int argi = 1; argi < argc ; ++argi) {
|
||||
@ -483,17 +484,11 @@ int LyX::init(int & argc, char * argv[])
|
||||
}
|
||||
|
||||
// Initialization of LyX (reads lyxrc and more)
|
||||
try {
|
||||
LYXERR(Debug::INIT, "Initializing LyX::init...");
|
||||
bool success = init();
|
||||
LYXERR(Debug::INIT, "Initializing LyX::init...done");
|
||||
if (!success)
|
||||
return EXIT_FAILURE;
|
||||
} catch (exception const &e) {
|
||||
// This can happen _in_theory_ in replaceEnvironmentPath
|
||||
lyxerr << "Caught exception `" << e.what() << "'." << endl;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
// Remaining arguments are assumed to be files to load.
|
||||
for (int argi = 1; argi < argc; ++argi)
|
||||
pimpl_->files_to_load_.push_back(os::utf8_argv(argi));
|
||||
@ -509,6 +504,12 @@ int LyX::init(int & argc, char * argv[])
|
||||
}
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
|
||||
} catch (exception const &e) {
|
||||
// This can happen _in_theory_ in replaceEnvironmentPath
|
||||
lyxerr << "Caught exception `" << e.what() << "'." << endl;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user