fix(JavaChecker): show process start error string

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
(cherry picked from commit 8de7aa2b17)
This commit is contained in:
Octol1ttle 2026-06-10 17:10:33 +05:00 committed by github-actions[bot]
parent ef2ebf0894
commit 152a52aeaa

View file

@ -179,13 +179,20 @@ void JavaChecker::finished(int exitcode, QProcess::ExitStatus status)
void JavaChecker::error(QProcess::ProcessError err) void JavaChecker::error(QProcess::ProcessError err)
{ {
if (err == QProcess::FailedToStart) { if (err == QProcess::FailedToStart) {
qDebug() << "Java checker has failed to start."; qDebug() << "Java checker has failed to start:" << process->errorString();
qDebug() << "Process environment:"; qDebug() << "Process environment:";
qDebug() << process->environment(); qDebug() << process->environment();
qDebug() << "Native environment:"; qDebug() << "Native environment:";
qDebug() << QProcessEnvironment::systemEnvironment().toStringList(); qDebug() << QProcessEnvironment::systemEnvironment().toStringList();
killTimer.stop(); killTimer.stop();
emit checkFinished({ m_path, m_id });
Result result = {
m_path,
m_id,
};
result.errorLog = process->errorString();
result.validity = Result::Validity::Errored;
emit checkFinished(result);
} }
emitSucceeded(); emitSucceeded();
} }