run LyX against Qt 4.8.x. On Windows, Qt 4.8.5 suffers from a bug that
breaks the use of shortcuts, so on Windows Qt 4.8.4 is advised.
+- LyX now gives an error if the underlying LaTeX command exited with error.
+
Known issues in version 2.2.0
-----------------------------
"Additionally, LyX could not locate "
"the LaTeX log %1$s."), from_utf8(name));
Alert::error(_("LaTeX failed"), str);
+ } else if (result & LaTeX::NONZERO_ERROR) {
+ docstring const str =
+ bformat(_( "The external program\n%1$s\n"
+ "finished with an error. "
+ "It is recommended you fix the cause of the external "
+ "program's error (check the logs). "), from_utf8(command));
+ // FIXME: In LyX 2.3.0 the warning will be converted to an error.
+ Alert::error(_("LaTeX failed"), str);
} else if (result & LaTeX::NO_OUTPUT) {
Alert::warning(_("Output is empty"),
_("No output file was generated."));
LYXERR(Debug::LATEX, "Run #" << count);
message(runMessage(count));
- startscript();
+ int const exit_code = startscript();
+
scanres = scanLogFile(terr);
if (scanres & ERROR_RERUN) {
LYXERR(Debug::LATEX, "Rerunning LaTeX");
// Write the dependencies to file.
head.write(depfile);
+
if (scanres & NO_OUTPUT) {
// A previous run could have left a PDF and since
// no PDF is created if NO_OUTPUT, we remove any
// be the same so any lingering PDF will be viewed.
deleteFilesOnError();
}
+
+ if (exit_code)
+ scanres |= NONZERO_ERROR;
+
LYXERR(Debug::LATEX, "Done.");
return scanres;
}
///
BIBTEX_ERROR = 16384,
///
+ NONZERO_ERROR = 32768, // the command exited with nonzero status
+ ///
//FIXME: BIBTEX_ERROR has been removed from ERRORS for now, since users were irritated
// about those errors which prevented compilation of previously compiling documents.
// Think about a "gentle" transfer to BibTeX error reporting.
- ERRORS = TEX_ERROR + LATEX_ERROR,
+ ERRORS = TEX_ERROR + LATEX_ERROR + NONZERO_ERROR,
///
WARNINGS = TEX_WARNING + LATEX_WARNING + PACKAGE_WARNING
};