zjffun / vscode-snippets-manager

Create and edit snippets easily.
https://marketplace.visualstudio.com/items?itemName=zjffun.snippetsmanager
MIT License
38 stars 7 forks source link

Log snippet file name and line on parse error #14

Closed ryanspain closed 1 year ago

ryanspain commented 1 year ago

Addresses #13 by outputting the snippet file name and offending line number when a snippet fails to parse.

Before this change:

image

After this change:

image

Despite the error message/code being different in the above logs, the root cause was a trailing comma in all cases. I wasn't able to find a way to interpret that, so I simply added a catchall tip for the user to check for trailing commas.