Skip to content

Provide more descriptive error messages in RuntimeTypeNameParser#9343

Merged
ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:fix/descriptive-typeformatter-errors
Feb 12, 2025
Merged

Provide more descriptive error messages in RuntimeTypeNameParser#9343
ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:fix/descriptive-typeformatter-errors

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Feb 12, 2025

Copy link
Copy Markdown
Member

When malformed strings are passed to RuntimeTypeNameParser, it is currently difficult to know where the issue lies. This PR changes the output error message to include the input string and a visual position indicator + index. Example:

 Encountered unexpected character. Expected ',', actual '`' in string:
 > MalformedName[`
 >               ^
Microsoft Reviewers: Open in CodeFlow

@ReubenBond
ReubenBond merged commit fda4f4f into dotnet:main Feb 12, 2025
@ReubenBond
ReubenBond deleted the fix/descriptive-typeformatter-errors branch February 12, 2025 17:31
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant