-
Notifications
You must be signed in to change notification settings - Fork 46
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
Exception Location information is wrong #37
Comments
Hey @Vampire, thanks for the feedback. Are you able to share a simple sample YAML file that demonstrates the problem? It would be helpful to be able to reproduce the issue you're seeing so that I can confirm that I've fixed the problem. |
Sure: bar:
- &baz
bam: boo
foo: *baz DAO: @Serializable
data class Foo(
val bar: List<Map<String, String>>,
val foo: String
) Result:
2:7 is the |
Just to keep you updated - this is not straightforward to fix, so I'm not going to be able to fix it soon. I'll keep the issue open until I have a chance to take a look at this. |
This describes the path taken to get to a node and will be helpful for resolving the issue described in #37.
This will make it much easier to show more detailed error messages. See #37.
This has been fixed, and will be part of the next release. Exceptions now have the concept of a path, which shows the path taken to get to the location of the error. For example |
I just got a parse error at
Exception Location: Location(line=243, column=23)
sayingValue for 'distribution1' is invalid: Expected a string, but got a map
.But in my input file at 243:23 there is no
distribution1
key.The earliest is at line 557.
Actually at 243:23 I define an anchor for a map.
And then further down e. g. at 557 for
distribution1
I use that anchor.So the line information is showing the referenced to line instead of the referencing line which makes it a bit harder to find the actual problem, as you don't know which referencing line causes a parsing error.
The text was updated successfully, but these errors were encountered: