Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Errors with insufficient information about code position. #66

Open
KonstantinSviridov opened this issue Jun 19, 2015 · 1 comment
Open
Labels

Comments

@KonstantinSviridov
Copy link

KonstantinSviridov commented Jun 19, 2015

Hi, guys.

Some places in the parser throw exceptions which do not provide information about code position. For example:

java.lang.ClassCastException: org.yaml.snakeyaml.nodes.ScalarNode cannot be cast to org.yaml.snakeyaml.nodes.MappingNode
at org.raml.parser.visitor.TemplateResolver.loopTemplateSequence(TemplateResolver.java:145)
at org.raml.parser.visitor.TemplateResolver.init(TemplateResolver.java:129)
at org.raml.parser.visitor.RamlValidationService.preValidation(RamlValidationService.java:51)
at org.raml.parser.visitor.YamlValidationService.validate(YamlValidationService.java:64)
at org.raml.parser.visitor.YamlValidationService.validate(YamlValidationService.java:95)
at org.raml.parser.visitor.YamlValidationService.validate(YamlValidationService.java:77)

Being able to see positions and messages describing RAML nature of the error would be nice.

Initially the problem arose with RAML->JAX-RS generator.
mulesoft-labs/raml-for-jax-rs#103
I post this issue as the generator makes use of the 0.9-SNAPSHOT parser.

Regards, Konstantin.

Aha! Link: https://mulesoft-roadmap.aha.io/features/APIRAML-147

@ok11
Copy link

ok11 commented Jun 24, 2015

Hi folks,

as the original issue was open by me, feel free to ask for snippets, where the problem may be reproduced

Regards, ok11

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants