Enhance card update error description.

This commit is contained in:
Lukas Brübach 2025-02-18 21:47:57 +01:00
parent 74f3973567
commit 2286419945

View file

@ -1216,22 +1216,25 @@ void MainWindow::cardUpdateError(QProcess::ProcessError err)
error = tr("Failed to start. The file might be missing, or permissions might be incorrect."); error = tr("Failed to start. The file might be missing, or permissions might be incorrect.");
break; break;
case QProcess::Crashed: case QProcess::Crashed:
error = tr("Crashed. The process terminated unexpectedly."); error = tr("The process crashed some time after starting successfully.");
error += "\n\nError output:\n" + cardUpdateProcess->readAllStandardError(); error += "\n\nError output:\n" + cardUpdateProcess->readAllStandardError();
break; break;
case QProcess::Timedout: case QProcess::Timedout:
error = tr("Timed out. The process took too long to respond."); error =
tr("Timed out. The process took too long to respond. The last waitFor...() function timed out.");
break; break;
case QProcess::WriteError: case QProcess::WriteError:
error = tr("Write error. The process couldn't receive input."); error = tr("An error occurred when attempting to write to the process. For example, the process may "
break; "not be running, or it may have closed its input channel.");
case QProcess::ReadError: break;
error = tr("Read error. The process couldn't send output."); case QProcess::ReadError:
error = tr("An error occurred when attempting to read from the process. For example, the process may "
"not be running.");
break; break;
case QProcess::UnknownError: case QProcess::UnknownError:
default: default:
error = tr("Unknown error occurred."); error = tr("Unknown error occurred.");
break; break;
} }
exitCardDatabaseUpdate(); exitCardDatabaseUpdate();