diff --git a/src/Converter.cpp b/src/Converter.cpp index 0f97b7396e..3d3181aae0 100644 --- a/src/Converter.cpp +++ b/src/Converter.cpp @@ -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"), diff --git a/src/LaTeX.cpp b/src/LaTeX.cpp index ce78b14a25..38a457deb5 100644 --- a/src/LaTeX.cpp +++ b/src/LaTeX.cpp @@ -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 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();