Skip to content

Improve anonymous serialization exception message #5706

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

Merged
merged 1 commit into from
May 21, 2021

Conversation

stevejgordon
Copy link
Contributor

@stevejgordon stevejgordon commented May 21, 2021

When the IL generated serializer throws, we don't have a particularly useful exception for the caller. This PR addresses this with an initial improvement to throw a more specialised AnonymousTypeSerializationException which includes the property names and types in the message, and a AnonymousType property to access the original type.

Fixes #5702

@stevejgordon stevejgordon merged commit 5161ed2 into 7.13 May 21, 2021
@stevejgordon stevejgordon deleted the anonymous-serialization-exception-message branch May 21, 2021 11:34
stevejgordon added a commit that referenced this pull request Jun 8, 2021
Co-authored-by: Steve Gordon <sgordon@hotmail.co.uk>
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.

1 participant