Print message for unknown install exception #3164
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
We have had a few reports of installation failing without any info about the reason for the failure (see #3143, #3144, #3150):
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
toPostInstall
andPostInstall
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'sMessage
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.)