Give a better error message for missing layout include files

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15239 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2006-10-04 16:22:38 +00:00
parent ba81af5fb2
commit 906b278008

View 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;