-
-
Notifications
You must be signed in to change notification settings - Fork 462
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
More detailed deserialization error messages? #245
Comments
The exception should indicate the line number and line offset of the error, as well as a message explaining the error. What additional information would be helpful to you ? |
What would help me is the name of the property being bound to, because so far most of the errors have been associated with defining the target property incorrectly. For example: public class TestTarget yaml file: property1 This will fail because Property1 should've been declared as a collection of strings, not a single string. But knowing the line and column where the error took place in the code isn't as helpful as knowing which target property failed to initialize. If the target property name was included in the exception message it would be helpful. Apologies if this info is already present and I'm just not seeing it. |
I see what you mean. I agree that this information would be useful. It shouldn't be too hard to add that information. I'll see what can be done. |
@aaubry This issue is important. Please report the actual property name that cannot be deserialized on error. I wasted 30 mins investigating a failed deserialization because the line/char number are inaccurate and do not point to the actual property. Instead they seem to point to the 'parent' line of the failed property (the line beginning/after the -) which in this case was many lines above the actual problem. |
Any progress on this? |
Is there a way to get more detailed deserialization errors? When there's a problem with the model I'm trying to deserialize into (e.g., I've defined a property as a string when it needs to be a collection of strings), I'm generally reduced to commenting out all but one property in the target model, running the program, see if the exception occurs, rinse & repeat.
Perhaps some form of logging facility? Or is one already built in?
The text was updated successfully, but these errors were encountered: