Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

edvilme
Copy link
Contributor

@edvilme edvilme commented Nov 14, 2024

Currently it is difficult for users of this library to compare and classify ArgumentExceptions, especially since the messages are formatted, localized strings.
This creates a new class SolutionArgumentException that additionally has a Type property that corresponds to a member of enum SolutionArgumentExceptionType.

@edvilme
Copy link
Contributor Author

edvilme commented Nov 14, 2024

@microsoft-github-policy-service agree company="Microsoft"

Copy link
Contributor

@kasperk81 kasperk81 left a comment

Choose a reason for hiding this comment

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

after this is merged and published need to update source build dotnet/source-build-externals#392 then publish to dotnet9 and 10 feeds, update msbuild and then sdk. (that's one of many reasons i was suggesting to make your life and the sdk implementation simpler and handle this error cases less pedantically)


public class SolutionArgumentException : ArgumentException
{
public readonly SolutionErrorType Type;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
public readonly SolutionErrorType Type;
public SolutionErrorType Type { get; init; }

by convention, this should be a readonly property

@richardstanton richardstanton merged commit 445a2f3 into microsoft:main Nov 18, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants