Fixed uncaught exception when XRefMap is invalid #1785
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.
The deserialization exceptions were making it to the generic unhandled exception dialog due to the relevant catch clause looking for
SystemException
.SystemException
(and its complementApplicationException
) is a bit of a failed experiment from .NET Framework 1. It's no longer used for newSystem.*
exceptions, and even before .NET Core it was applied very inconsistently. IMO the line between exceptions in theSystem
namespace and exceptions outside of it is basically meaningless and very fuzzy regardless.As such this PR increases the scope to just plain
Exception
.This still would have resulted in very vague low-level errors reaching the end user, so I introduced
DocumentationException
to denote specific errors when parsing the XRefMap.When one XRefMap fails due to a 404 and another fails due to a
DocumentationException
, theDocumentationException
takes priority.Here is the error that occurs when the documentation server responds with something other than an XRefMap:
And here's the error that occurs when the documentation server responds with something that claims to be an XRefMap but isn't unusable:
Fixes #1507