From 70eddf2c309e9d6e5db36e34539483d2dc599e86 Mon Sep 17 00:00:00 2001 From: Scott Kostyshak Date: Thu, 28 Mar 2013 03:46:35 -0400 Subject: [PATCH] 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 --- src/LyX.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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; } } -- 2.39.2