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

Provide a better exception when a PrimitiveValue is encountered when … #488

Conversation

JefWight
Copy link
Contributor

…trying to read a ComplexType

Currently, when we parse the JSON for a ComplexType property, if we
encounter a PrimitiveValue, we get back an exception that is mostly
useless to a client:

An unexpected 'PrimitiveValue' node was found when reading from the JSON
reader. A 'StartObject' node was expected.

This change makes the exception provide the property name and a
description of what was expected, including the type name.

Resolves #487
Fix #487

…trying to read a ComplexType

Currently, when we parse the JSON for a ComplexType property, if we
encounter a PrimitiveValue, we get back an exception that is mostly
useless to a client:

An unexpected 'PrimitiveValue' node was found when reading from the JSON
reader. A 'StartObject' node was expected.

This change makes the exception provide the property name and a
description of what was expected, including the type name.
@LianwMS
Copy link
Contributor

LianwMS commented Mar 16, 2016

submit with 942180d and closed

@LianwMS LianwMS closed this Mar 16, 2016
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