279 err = format ("Program exited abnormally (return code %1).", proc.exitCode()); |
279 err = format ("Program exited abnormally (return code %1).", proc.exitCode()); |
280 |
280 |
281 if (not err.isEmpty()) |
281 if (not err.isEmpty()) |
282 { |
282 { |
283 CriticalError (format ("%1 failed: %2\n", g_extProgNames[prog], err)); |
283 CriticalError (format ("%1 failed: %2\n", g_extProgNames[prog], err)); |
284 |
|
285 QString filename ("externalProgramOutput.txt"); |
284 QString filename ("externalProgramOutput.txt"); |
286 QFile file (filename); |
285 QFile file (filename); |
|
286 |
287 if (file.open (QIODevice::WriteOnly | QIODevice::Text)) |
287 if (file.open (QIODevice::WriteOnly | QIODevice::Text)) |
288 { |
288 { |
289 file.write (proc.readAllStandardOutput()); |
289 file.write (proc.readAllStandardOutput()); |
290 file.write (proc.readAllStandardError()); |
290 file.write (proc.readAllStandardError()); |
291 print ("Wrote output and error logs to %1", QFileInfo (file).absoluteFilePath()); |
291 print ("Wrote output and error logs to %1", QFileInfo (file).absoluteFilePath()); |