Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't report an unknown error if it is known #2995

Merged
merged 1 commit into from
Feb 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion GUI/Main/MainChangeset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ private void Changeset_OnConfirmChanges()
{
menuStrip1.Enabled = false;

//Using the changeset passed in can cause issues with versions.
// Using the changeset passed in can cause issues with versions.
// An example is Mechjeb for FAR at 25/06/2015 with a 1.0.2 install.
// TODO Work out why this is.
installWorker.RunWorkerAsync(
Expand Down
16 changes: 13 additions & 3 deletions GUI/Main/MainInstall.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ public partial class Main
{
private BackgroundWorker installWorker;

// used to signal the install worker that the user canceled the install process
// this may happen on the recommended/suggested mods dialogs
// Used to signal the install worker that the user canceled the install process.
// This may happen on the recommended/suggested mods dialogs or during the download.
private volatile bool installCanceled;

/// <summary>
Expand Down Expand Up @@ -417,9 +417,19 @@ private void PostInstallMods(object sender, RunWorkerCompletedEventArgs e)
);
}
}
else if (e.Error == null)
{
// The install was unsuccessful, but we did catch the exception.
FailWaitDialog(
Properties.Resources.MainInstallErrorInstalling,
Properties.Resources.MainInstallKnownError,
Properties.Resources.MainInstallFailed,
result.Key
);
}
else
{
// There was an error
// An unknown error was thrown which we didn't catch.
FailWaitDialog(
Properties.Resources.MainInstallErrorInstalling,
Properties.Resources.MainInstallUnknownError,
Expand Down
3 changes: 3 additions & 0 deletions GUI/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions GUI/Properties/Resources.de-DE.resx
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,9 @@ Einstellungen jetzt öffnen?</value>
<data name="MainInstallInstallCanceled" xml:space="preserve"><value>(De-)Installation/Aktualisierung abgebrochen!</value></data>
<data name="MainInstallErrorInstalling" xml:space="preserve"><value>Fehler bei der Installation!</value></data>
<data name="MainInstallUnknownError" xml:space="preserve"><value>Ein unbekannter Fehler ist aufgetreten, bitte versuche es erneut!</value></data>
<data name="MainInstallKnownError" xml:space="preserve"><value>Falls die Fehlermeldung ein Download-Problem andeutet, versuche es bitte erneut. Andernfalls melde bitte den Fehler bei uns.
Wenn du ein Fehler mit den Mod-Metadaten vermutest: https://github.com/KSP-CKAN/NetKAN/new/choose
Wenn du ein Fehler mit dem CKAN Client vermutest: https://github.com/KSP-CKAN/CKAN/new/choose</value></data>
<data name="MainInstallFailed" xml:space="preserve"><value>Installation fehlgeschlagen!</value></data>
<data name="MainInstallProvidedBy" xml:space="preserve"><value>Modul {0} wird von mehr als einem verfügbaren Modul bereitgestellt, bitte wähle eine der folgenden Mods:</value></data>
<data name="ModInfoVirtual" xml:space="preserve"><value>{0} (virtuell)</value></data>
Expand Down
3 changes: 3 additions & 0 deletions GUI/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,9 @@ Open settings now?</value></data>
<data name="MainInstallInstallCanceled" xml:space="preserve"><value>(Un)Install/Upgrade canceled!</value></data>
<data name="MainInstallErrorInstalling" xml:space="preserve"><value>Error during installation!</value></data>
<data name="MainInstallUnknownError" xml:space="preserve"><value>An unknown error occurred, please try again!</value></data>
<data name="MainInstallKnownError" xml:space="preserve"><value>If the above message indicates a download error, please try again. Otherwise, please open a issue for us to investigate.
If you suspect a metadata problem: https://github.com/KSP-CKAN/NetKAN/issues/new/choose
If you suspect a bug in the client: https://github.com/KSP-CKAN/CKAN/issues/new/choose</value></data>
<data name="MainInstallFailed" xml:space="preserve"><value>Installation failed!</value></data>
<data name="MainInstallProvidedBy" xml:space="preserve"><value>Module {0} is provided by more than one available module, please choose one of the following mods:</value></data>
<data name="ModInfoNSlashA" xml:space="preserve"><value>N/A</value></data>
Expand Down