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

Avoid throw an first chance XmlException in ISymbolExtensions.GetDocumentationComment() when xmlText is empty? #38779

Closed
yyjdelete opened this issue Sep 20, 2019 · 2 comments · Fixed by #42514
Labels
Area-IDE Concept-Continuous Improvement help wanted The issue is "up for grabs" - add a comment if you are interested in working on it IDE-IntelliSense Completion, Signature Help, Quick Info
Projects
Milestone

Comments

@yyjdelete
Copy link

Version Used:
master-vs-deps(9401294)
Related to #36028

Steps to Reproduce:

  1. Hover cursor on any params of non-override methods with document, or on any local vars in VS.

Expected Behavior:
No first chance exceptions should be throw.

Actual Behavior:
An XmlException is throw and catched. It's useless when xmlText is empty.

@sharwell sharwell added Area-IDE help wanted The issue is "up for grabs" - add a comment if you are interested in working on it IDE-IntelliSense Completion, Signature Help, Quick Info Concept-Continuous Improvement labels Sep 20, 2019
@sharwell sharwell added this to InQueue in Small Fixes via automation Sep 20, 2019
@sharwell sharwell added this to the Backlog milestone Sep 20, 2019
@KirillOsenkov
Copy link
Member

This is a recent regression and is quite annoying as it happens on every hover.

@KirillOsenkov
Copy link
Member

Note that there is potentially a second issue, not sure if unrelated: the XmlException can also have the message: "There are multiple root elements."

This can happen when you call XElement.Parse on text such as:


      <summary> Gets the solid fill color that has a hexadecimal value of #FFFFEBCD. </summary>
      <returns>A solid fill color.</returns>
    

There needs to be a better way to parse multiple XML elements like above, potentially use what the compiler does, or wrap the text with a fake root element.

You decide whether a separate issue should be filed for the above or it can be fixed as part of the fix for this issue.

sharwell added a commit to sharwell/roslyn that referenced this issue Mar 17, 2020
@ghost ghost closed this as completed in #42514 Mar 18, 2020
Small Fixes automation moved this from InQueue to Completed Mar 18, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Concept-Continuous Improvement help wanted The issue is "up for grabs" - add a comment if you are interested in working on it IDE-IntelliSense Completion, Signature Help, Quick Info
Projects
Small Fixes
  
Completed
Development

Successfully merging a pull request may close this issue.

3 participants