- lyxerr << "LayoutFileList::Read: unable to find "
- "textclass file `"
- << to_utf8(makeDisplayPath(real_file.absFilename(), 1000))
- << "'. Exiting." << endl;
- return false;
- // This causes LyX to end... Not a desirable behaviour. Lgb
- // What do you propose? That the user gets a file dialog
- // and is allowed to hunt for the file? (Asger)
- // more that we have a layout for minimal.cls statically
- // compiled in... (Lgb)
- }
-
- if (!lex.setFile(real_file)) {
- lyxerr << "LayoutFileList::Read: "
- "lyxlex was not able to set file: "
- << real_file << endl;
- }
-
- if (!lex.isOK()) {
- lyxerr << "LayoutFileList::Read: unable to open "
- "textclass file `"
- << to_utf8(makeDisplayPath(real_file.absFilename(), 1000))
- << "'\nCheck your installation. LyX can't continue."
- << endl;
- return false;
- }
-
- bool finished = false;
- // Parse config-file
- LYXERR(Debug::TCLASS, "Starting parsing of textclass.lst");
- while (lex.isOK() && !finished) {
- LYXERR(Debug::TCLASS, "\tline by line");
- switch (lex.lex()) {
- case Lexer::LEX_FEOF:
- finished = true;
- break;
- default:
- string const fname = lex.getString();
- LYXERR(Debug::TCLASS, "Fname: " << fname);
- if (lex.next()) {
+ LYXERR0("LayoutFileList::Read: unable to find textclass file "
+ << "`textclass.lst'.");
+ } else if (!lex.setFile(real_file)) {
+ LYXERR0("LayoutFileList::Read: lyxlex was not able to set file: "
+ << real_file << '.');
+ } else if (!lex.isOK()) {
+ LYXERR0("LayoutFileList::Read: unable to open textclass file `"
+ << makeDisplayPath(real_file.absFileName(), 1000)
+ << "'\nCheck your installation.");
+ } else {
+ // we have a file we can read.
+ bool finished = false;
+ LYXERR(Debug::TCLASS, "Starting parsing of textclass.lst");
+ while (lex.isOK() && !finished) {
+ LYXERR(Debug::TCLASS, "\tline by line");
+ switch (lex.lex()) {
+ case Lexer::LEX_FEOF:
+ finished = true;
+ break;
+ default:
+ string const fname = lex.getString();
+ LYXERR(Debug::TCLASS, "Fname: " << fname);
+ if (!lex.next())
+ break;