Give an error message when LyX cannot load a file

Before, the following commands correctly exited with code 1, but now
a reason for exiting is also given:

  lyx -e pdf2 doesNotExist
  lyx doesNotExist -e pdf2
This commit is contained in:
Scott Kostyshak 2013-03-28 03:46:35 -04:00
parent 2c2c17675d
commit 70eddf2c30

View File

@ -502,6 +502,10 @@ bool LyX::loadFiles()
}
else {
pimpl_->buffer_list_.release(buf);
docstring const error_message =
bformat(_("LyX failed to load the following file: %1$s"),
from_utf8(fname.absFileName()));
lyxerr << to_utf8(error_message) << endl;
success = false;
}
}