]> git.lyx.org Git - features.git/commitdiff
Give a better error message for missing layout include files
authorGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Wed, 4 Oct 2006 16:22:38 +0000 (16:22 +0000)
committerGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Wed, 4 Oct 2006 16:22:38 +0000 (16:22 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15239 a592a061-630c-0410-9148-cb99ea01b6c8

src/lyxtextclass.C

index 7eae766cff10c94623f2a20c2b64171a842ee238..8ccde3599650509ee68963e05842bd0bff00d9ff 100644 (file)
@@ -257,11 +257,15 @@ bool LyXTextClass::read(string const & filename, bool merge)
 
                case TC_INPUT: // Include file
                        if (lexrc.next()) {
-                               string tmp = libFileSearch("layouts",
-                                                           lexrc.getString(),
+                               string const inc = lexrc.getString();
+                               string tmp = libFileSearch("layouts", inc,
                                                            "layout");
 
-                               if (read(tmp, true)) {
+                               if (tmp.empty()) {
+                                       lexrc.printError("Could not find input"
+                                                        "file: " + inc);
+                                       error = true;
+                               } else if (read(tmp, true)) {
                                        lexrc.printError("Error reading input"
                                                         "file: "+tmp);
                                        error = true;