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

Add SolutionArgumentException with error types #74

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

edvilme
Copy link

@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
Author

edvilme commented Nov 14, 2024

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

Copy link

@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 SolutionErrorType Type;

Choose a reason for hiding this comment

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

readonly property?

Copy link
Member

Choose a reason for hiding this comment

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

I agree, this should be a readonly property.

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