From: Scott Kostyshak Date: Thu, 28 Mar 2013 07:46:35 +0000 (-0400) Subject: Give an error message when LyX cannot load a file X-Git-Tag: 2.1.0beta1~448 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=70eddf2c309e9d6e5db36e34539483d2dc599e86;p=features.git 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 --- diff --git a/src/LyX.cpp b/src/LyX.cpp index ec522dead9..2096be7a77 100644 --- a/src/LyX.cpp +++ b/src/LyX.cpp @@ -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; } }