]> git.lyx.org Git - lyx.git/commitdiff
Catch xdvipdfmx driver error (that breaks XeTeX compilation).
authorJuergen Spitzmueller <spitz@lyx.org>
Sun, 25 Jun 2017 08:29:19 +0000 (10:29 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Tue, 4 Jul 2017 08:48:45 +0000 (10:48 +0200)
This prevents an assertion due to an unrecognized error.

Fixes: #10076.
src/LaTeX.cpp
status.22x

index 739a9926dd77fb171d56fda41db762d023d87203..46dda96a881777ea6fab519fb4666a86a712181d 100644 (file)
@@ -887,8 +887,16 @@ int LaTeX::scanLogFile(TeXErrors & terr)
                        } else if (contains(token, "No pages of output")) {
                                // A dvi file was not created
                                retval |= NO_OUTPUT;
+                       } else if (contains(token, "Error 256 (driver return code)")) {
+                               // This is a xdvipdfmx driver error reported by XeTeX.
+                               // We have to check whether an output PDF file was created.
+                               FileName pdffile = file;
+                               pdffile.changeExtension("pdf");
+                               if (!pdffile.exists())
+                                       // No output PDF file was created (see #10076)
+                                       retval |= NO_OUTPUT;
                        } else if (contains(token, "That makes 100 errors")) {
-                               // More than 100 errors were reprted
+                               // More than 100 errors were reported
                                retval |= TOO_MANY_ERRORS;
                        } else if (prefixIs(token, "!pdfTeX error:")) {
                                // otherwise we dont catch e.g.:
index 4546661d6cf42e8752667c0408d494036a53e5bc..7621e076c61d5757d4af7803ea2987fc7b537baa 100644 (file)
@@ -49,6 +49,8 @@ What's new
 
 - Catch "! Incomplete \if[x]" LaTeX error (bug 10666).
 
+- Catch xdvipdfmx driver error that breaks XeTeX compilation (bug 10076).
+
 - Fix caption handling in listings insets when it is split into multiple
   lines in the LaTeX output (bug 10705).