From: Scott Kostyshak Date: Fri, 10 Mar 2017 20:38:27 +0000 (-0500) Subject: Change a warning to an error if missing include X-Git-Tag: 2.3.0alpha1~230 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=72c3dbd02ccd0a3b85f1c9b940462ac1e7ed98d6;p=features.git Change a warning to an error if missing include If an included file is not found, it seems impossible that the final output would be correct. Before this commit, when exporting on the command line, LyX would create the PDF and exit with a zero error code so unless the user was monitoring the terminal output, they would not know there is a problem. This change is consistent with 1a374a93. --- diff --git a/src/insets/InsetInclude.cpp b/src/insets/InsetInclude.cpp index a5ed017d75..4820301200 100644 --- a/src/insets/InsetInclude.cpp +++ b/src/insets/InsetInclude.cpp @@ -640,7 +640,8 @@ void InsetInclude::latex(otexstream & os, OutputParams const & runparams) const "file\n`%1$s'\n" "Please, check whether it actually exists."), included_file.displayName()); - Alert::warning(_("Missing included file"), text); + throw ExceptionMessage(ErrorException, _("Error: "), + text); } return; }