diff --git a/gui/checkthread.cpp b/gui/checkthread.cpp index 26cc2bbc6..551eed382 100644 --- a/gui/checkthread.cpp +++ b/gui/checkthread.cpp @@ -313,7 +313,22 @@ void CheckThread::runAddonsAndTools(const ImportProject::FileSettings *fileSetti process.setProcessEnvironment(env); } process.start(python, args); - process.waitForFinished(); + if (!process.waitForFinished()) { + const QString errMsg("ERROR: Process '" + python + " " + args.join(" ") + + "' did not finish successfully: " + process.errorString()); + qWarning() << errMsg; + mResult.reportOut(errMsg.toStdString()); + } + const QByteArray errout = process.readAllStandardError(); + if (process.exitCode() != 0 && !errout.isEmpty()) { + const QString errMsg("ERROR: Process '" + python + " " + args.join(" ") + + "' failed with error code " + + QString::number(process.exitCode()) + ": '" + + process.errorString() + + "'\nError output: " + errout); + qWarning() << errMsg; + mResult.reportOut(errMsg.toStdString()); + } const QString output(process.readAllStandardOutput()); QFile f(dumpFile + '-' + addon + "-results"); if (f.open(QIODevice::WriteOnly | QIODevice::Text)) {