mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
Continue compilation despite errors (#8739)
Now that we have the "Show Output Anyway" button (09700d5b
),
it makes sense to continue compilation even if there is an error.
This commit is contained in:
parent
06729bf0bb
commit
03b17b5272
@ -653,8 +653,12 @@ bool Converters::runLaTeX(Buffer const & buffer, string const & command,
|
||||
if (result & LaTeX::ERRORS)
|
||||
buffer.bufferErrors(terr, errorList);
|
||||
|
||||
// check return value from latex.run().
|
||||
if (result & LaTeX::NO_LOGFILE) {
|
||||
if (!errorList.empty()) {
|
||||
// We will show the LaTeX Errors GUI later which contains
|
||||
// specific error messages so it would be repetitive to give
|
||||
// e.g. the "finished with an error" dialog in addition.
|
||||
}
|
||||
else if (result & LaTeX::NO_LOGFILE) {
|
||||
docstring const str =
|
||||
bformat(_("LaTeX did not run successfully. "
|
||||
"Additionally, LyX could not locate "
|
||||
@ -666,7 +670,6 @@ bool Converters::runLaTeX(Buffer const & buffer, string const & command,
|
||||
"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"),
|
||||
|
@ -240,13 +240,6 @@ int LaTeX::run(TeXErrors & terr)
|
||||
scanres = scanLogFile(terr);
|
||||
}
|
||||
|
||||
if (scanres & ERRORS) {
|
||||
// We no longer run deleteFilesOnError() here
|
||||
// because we now show a resulting PDF even if
|
||||
// there was an error.
|
||||
return scanres; // return on error
|
||||
}
|
||||
|
||||
vector<AuxInfo> const bibtex_info = scanAuxFiles(aux_file);
|
||||
if (!run_bibtex && bibtex_info_old != bibtex_info)
|
||||
run_bibtex = true;
|
||||
@ -335,8 +328,6 @@ int LaTeX::run(TeXErrors & terr)
|
||||
message(runMessage(count));
|
||||
startscript();
|
||||
scanres = scanLogFile(terr);
|
||||
if (scanres & ERRORS)
|
||||
return scanres; // return on error
|
||||
|
||||
// update the depedencies
|
||||
deplog(head); // reads the latex log
|
||||
@ -407,8 +398,6 @@ int LaTeX::run(TeXErrors & terr)
|
||||
message(runMessage(count));
|
||||
startscript();
|
||||
scanres = scanLogFile(terr);
|
||||
if (scanres & ERRORS)
|
||||
return scanres; // return on error
|
||||
|
||||
// keep this updated
|
||||
head.update();
|
||||
|
Loading…
Reference in New Issue
Block a user