mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-27 14:29:21 +00:00
Catch exceptions to please coverity
Actually, the possible exception path is from replaceEnvironmentPath. It would be better if coverity was able to asses that our hardcoded regexp:s are correct.
This commit is contained in:
parent
fc2d8238dc
commit
6b6fa94c91
15
src/LyX.cpp
15
src/LyX.cpp
@ -483,12 +483,17 @@ int LyX::init(int & argc, char * argv[])
|
||||
}
|
||||
|
||||
// Initialization of LyX (reads lyxrc and more)
|
||||
LYXERR(Debug::INIT, "Initializing LyX::init...");
|
||||
bool success = init();
|
||||
LYXERR(Debug::INIT, "Initializing LyX::init...done");
|
||||
if (!success)
|
||||
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));
|
||||
|
@ -1067,7 +1067,10 @@ Server::~Server()
|
||||
string message;
|
||||
for (int i = 0; i != numclients_; ++i) {
|
||||
message = "LYXSRV:" + clients_[i] + ":bye\n";
|
||||
pipes_.send(message);
|
||||
// ignore exceptions, we are quitting anyway
|
||||
try {
|
||||
pipes_.send(message);
|
||||
} catch (...) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user