Skip to content

YAML parse errors are not handled properly and instead cause a crash #1293

Description

@johnbartholomew

Example:

./jsonnet -e 'std.parseYaml("a: b:")'
make: Nothing to be done for 'default'.
1:6: (5B): ERROR: two colons on same line
1:6: a: b:  (size=5)
          ^  (cols 6-6)

Aborted                    (core dumped) ./jsonnet -e 'std.parseYaml("a: b:")'

RapidYAML produces an exception but it's not caught so it just kills everything. Instead the exception should be caught and an appropriate Jsonnet error with backtrace should be produced. Ideally the YAML parse error information should still be exposed through the error message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions