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.
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.