exit_status = pimpl_->application_->exec();
else if (!pimpl_->files_to_load_.empty()) {
vector<string>::const_iterator it = pimpl_->files_to_load_.begin();
exit_status = pimpl_->application_->exec();
else if (!pimpl_->files_to_load_.empty()) {
vector<string>::const_iterator it = pimpl_->files_to_load_.begin();
- // close buffers first
- pimpl_->buffer_list_.closeAll();
+ // closing buffer may throw exceptions, but we ignore them since we
+ // are quitting.
+ try {
+ // close buffers first
+ pimpl_->buffer_list_.closeAll();
+ } catch (ExceptionMessage const &) {}
// if they were not named on the command line. We do not want to dispatch to
// those.
vector<Buffer *> command_line_buffers;
// if they were not named on the command line. We do not want to dispatch to
// those.
vector<Buffer *> command_line_buffers;
if (lyxrc.example_path.empty()) {
lyxrc.example_path = addPath(package().system_support().absFileName(),
if (lyxrc.example_path.empty()) {
lyxrc.example_path = addPath(package().system_support().absFileName(),
|| configFileNeedsUpdate("lyxmodules.lst")
|| configFileNeedsUpdate("textclass.lst")
|| configFileNeedsUpdate("packages.lst")
|| configFileNeedsUpdate("lyxmodules.lst")
|| configFileNeedsUpdate("textclass.lst")
|| configFileNeedsUpdate("packages.lst")
" where fmt is the export format of choice. Look in\n"
" Tools->Preferences->File Handling->File Formats->Short Name\n"
" to see which parameter (which differs from the format name\n"
" where fmt is the export format of choice. Look in\n"
" Tools->Preferences->File Handling->File Formats->Short Name\n"
" to see which parameter (which differs from the format name\n"
" Note that the order of -e and -x switches matters.\n"
"\t-E [--export-to] fmt filename\n"
" where fmt is the export format of choice (see --export),\n"
" Note that the order of -e and -x switches matters.\n"
"\t-E [--export-to] fmt filename\n"
" where fmt is the export format of choice (see --export),\n"