+
+ // bug 6445. At this point its not clear we finish with error.
+ if (prefixIs(token, "! File ended while scanning")){
+ wait_for_error = desc;
+ continue;
+ }
+ if (!wait_for_error.empty() && prefixIs(token, "! Emergency stop.")){
+ retval |= LATEX_ERROR;
+ string errstr;
+ int count = 0;
+ errstr = wait_for_error;
+ do {
+ if (!getline(ifs, tmp))
+ break;
+ errstr += "\n" + tmp;
+ if (++count > 5)
+ break;
+ } while (!contains(tmp, "(job aborted"));
+
+ terr.insertError(0,
+ from_local8bit("Emergency stop"),
+ from_local8bit(errstr));
+ }
+