Skip to content
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

Request for better error messages for JSON parsing errors #153

Open
etellman opened this issue Dec 12, 2020 · 0 comments
Open

Request for better error messages for JSON parsing errors #153

etellman opened this issue Dec 12, 2020 · 0 comments

Comments

@etellman
Copy link

One of the side effects of Oct 30th change to JSON parsing is that the parser is more strict, which is great. Unfortunately for me, this exposed a syntax error (misplaced comma) in my .projections.json file. I've been using this file for years, so it didn't immediately occur to me that it might not be valid.

The symptom was that Projectionist silently failed to load without printing an error message. I figured out what was wrong by adding an 'echo' statement in the catch block at line 72 of autoload/projectionist.vim. When it printed a message, I took a closer look at my .projections.json file and found the syntax error.

I'm not a vim script expert, and had to spend a little time perusing "Learn VimScript the Hard Way" to figure out how to get a message to print. It looks like when there's an error, json_parse should fall through to the end and throw an exception, but I didn't see the message printing anywhere.

Anyway, my feature request is to have a more obvious error message for syntax errors in .projections.json files.

@etellman etellman changed the title Request for better error messags for JSON parsing errors Request for better error messages for JSON parsing errors Dec 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant