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

Print message for unknown install exception #3164

Merged
merged 1 commit into from
Oct 4, 2020

Conversation

HebaruSan
Copy link
Member

Problem

We have had a few reports of installation failing without any info about the reason for the failure (see #3143, #3144, #3150):

image

That should never happen. Either the install should succeed, or we should see an indication of the reason it failed.

Cause

An exception is thrown during install, but PostInstall only prints messages for certain specific exception types. If the exception is something else, it won't be logged.

Unfortunately when we've sent a test build, the error went away, so the actual error is probably already fixed in master HEAD. We just don't know when or what it was, due to the lack of an error message.

Probably caused by the refactor of the install flow in #3041, when error printing was moved from InstallMods to PostInstall and PostInstall was simplified. I tried to keep the code functionally equivalent, but it was kind of spaghetti-ish so it's possible I missed a use case.

Changes

Now if PostInstall encounters an exception it doesn't recognize, we print the exception's Message property. This means that even if a really weird error happens, we'll have at least a basic clue of what it was.

Fixes #3143. Fixes #3144. Fixes #3150.
(The exception thrown in these seems to have been fixed already, but now we're fixing the part where you can't see it.)

@HebaruSan HebaruSan added Bug Something is not working as intended Easy This is easy to fix GUI Issues affecting the interactive GUI labels Oct 2, 2020
@HebaruSan HebaruSan requested a review from DasSkelett October 2, 2020 18:27
@HebaruSan

This comment has been minimized.

Copy link
Member

@DasSkelett DasSkelett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are probably never going to find out what caused the error all these users saw, but if something similar happens again, we are prepared!

@HebaruSan HebaruSan merged commit 7e575e0 into KSP-CKAN:master Oct 4, 2020
@HebaruSan HebaruSan deleted the fix/default-inst-err branch October 4, 2020 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is not working as intended Easy This is easy to fix GUI Issues affecting the interactive GUI
Projects
None yet
2 participants