]> git.lyx.org Git - features.git/commitdiff
Change a warning to an error if missing include
authorScott Kostyshak <skostysh@lyx.org>
Fri, 10 Mar 2017 20:38:27 +0000 (15:38 -0500)
committerScott Kostyshak <skostysh@lyx.org>
Sat, 11 Mar 2017 07:51:49 +0000 (02:51 -0500)
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.

src/insets/InsetInclude.cpp

index a5ed017d7526d466346f6ce42b04d295790807f6..482030120084cd420af63772dcdd672e68d1f98a 100644 (file)
@@ -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;
                }