Skip to content

Conversation

@nohwnd
Copy link
Member

@nohwnd nohwnd commented Nov 26, 2025

Partially fix #6906

The data are there, but the formatting is not great.

typeof(TException),
ex.GetType());
ex.GetType(),
ex.ToString());
Copy link
Member

Choose a reason for hiding this comment

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

ex.ToString() already contains the type right? Should we just have ex.ToString() to avoid unnecessarily duplicate info in assertion failure message?

Copy link
Member Author

Choose a reason for hiding this comment

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

I considered it but the whole message needs more love (I am summarizing that in the linked issue). So let's consider this just the first step there to help investigating the issue you were seeing.

Copy link
Member

Choose a reason for hiding this comment

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

The issue I was seeing is already fixed, it was just the message update related to caller arg expression breaking the test.

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.

Assert.Throws should print the actual exception.

3 participants