Skip to content

Crash on Saving Malformed YAML Syntax Config #28

Closed
@chrisdedman

Description

@chrisdedman

Describe the bug
When editing a YAML syntax config file, the application crashes if the formatting isn't right and you save the file. It could be if you forget to add an escape character, forget to add a required keyword in the YAML file, or forget to close your ending quotation mark.

To Reproduce
Steps to reproduce the behavior:

  1. Go to config/cpp.syntax.yaml
  2. Update one of the regex by removing the ending quotation mark, for example.
  3. Save the file, then open a C++ file
  4. The app should crash

Expected behavior
To prevent the app from crashing, we should have a mechanism that catches the error and displays an error message instead. Maybe even point out where the problem may be coming from.

Desktop:

  • OS: MacOS, Linux

hint: The catching mechanism should be implemented probably here:

void Syntax::loadSyntaxRules(const YAML::Node &config)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions