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

For 3rd party usage of this library, allow customing default exception messages to not mention Microsoft Support #78

Open
drewnoakes opened this issue Jan 23, 2021 · 3 comments

Comments

@drewnoakes
Copy link
Member

This library is used outside of VS, for example in the Git Extensions project (which also uses JTF and vs-mef).

Currently a violation of e.g. Assumes.NotNull produces an exception with message:

An internal error occurred. Please contact Microsoft Support.

Microsoft does not provide support for Git Extensions :)

What's more, the InternalErrorException exception type is private so the library cannot easily trap these and switch them.

@drewnoakes
Copy link
Member Author

drewnoakes commented Jan 23, 2021

cc @RussKie @sharwell

@AArnott
Copy link
Member

AArnott commented Jan 24, 2021

Good point. A cousin library that isn't Microsoft branded but otherwise is very similar uses an error message that does not mention Microsoft:

https://github.com/AArnott/Validation/blob/b30c8f449471cf75520a82ca89b39acf2f3047ad/src/Validation/Strings.resx#L142

For Git Extensions you might use that library instead. Although I suppose the other vs-threading and vs-mef libraries you're using will still bring in vs-validation and present the Microsoft support message to your users which you're trying to avoid, right? I wonder how to fix this nicely... mutable statics are a real problem all to often...

Just brainstorming here... what if we gave this vs-validation library a generic error message like its cousin has? Would that work for you?

@RussKie
Copy link
Member

RussKie commented Jan 24, 2021

what if we gave this vs-validation library a generic error message like its cousin has? Would that work for you?

Yes. Even if it throws a publicly exposed exception we can wrap it in another one. Tough throwing a non Microsoft-specific exception would probably be a better way forward.

swesonga added a commit to swesonga/project-system that referenced this issue Mar 10, 2021
…tion code

CPS PR 291660 converted the TraceUtilities.Source field into a property. The managed project system code now needs to detect this property. This PR also replaces the Assumes.NotNull calls with Assumes.Fail so that a helpful error message is written to the activity log detailing exactly why the managed project system package failed to load successfully. This can be improved once microsoft/vs-validation#78 has been addressed.
AArnott pushed a commit to AArnott/vs-validation that referenced this issue Apr 11, 2022
Remove macOS from Azure Pipeline runs
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

No branches or pull requests

3 participants