mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-18 08:22:15 -07:00
Enhance card update error description.
This commit is contained in:
parent
23f4c9c4e4
commit
74f3973567
1 changed files with 13 additions and 12 deletions
|
|
@ -1213,28 +1213,29 @@ void MainWindow::cardUpdateError(QProcess::ProcessError err)
|
||||||
QString error;
|
QString error;
|
||||||
switch (err) {
|
switch (err) {
|
||||||
case QProcess::FailedToStart:
|
case QProcess::FailedToStart:
|
||||||
error = tr("failed to start.");
|
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.");
|
error = tr("Crashed. The process terminated unexpectedly.");
|
||||||
|
error += "\n\nError output:\n" + cardUpdateProcess->readAllStandardError();
|
||||||
break;
|
break;
|
||||||
case QProcess::Timedout:
|
case QProcess::Timedout:
|
||||||
error = tr("timed out.");
|
error = tr("Timed out. The process took too long to respond.");
|
||||||
break;
|
break;
|
||||||
case QProcess::WriteError:
|
case QProcess::WriteError:
|
||||||
error = tr("write error.");
|
error = tr("Write error. The process couldn't receive input.");
|
||||||
break;
|
break;
|
||||||
case QProcess::ReadError:
|
case QProcess::ReadError:
|
||||||
error = tr("read error.");
|
error = tr("Read error. The process couldn't send output.");
|
||||||
break;
|
break;
|
||||||
case QProcess::UnknownError:
|
case QProcess::UnknownError:
|
||||||
default:
|
default:
|
||||||
error = tr("unknown error.");
|
error = tr("Unknown error occurred.");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
exitCardDatabaseUpdate();
|
exitCardDatabaseUpdate();
|
||||||
QMessageBox::warning(this, tr("Error"), tr("The card database updater exited with an error: %1").arg(error));
|
QMessageBox::warning(this, tr("Error"), tr("The card database updater exited with an error:\n%1").arg(error));
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::cardUpdateFinished(int, QProcess::ExitStatus)
|
void MainWindow::cardUpdateFinished(int, QProcess::ExitStatus)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue