-
Notifications
You must be signed in to change notification settings - Fork 7
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
Be clearer when there is an error with the user supplied json file #78
Comments
Yes, I hide the traceback of the exception thrown by the JSON parser. I thought it would make the output unreadable with uninformative lines. JSON format is pretty well-known so I thought it will be easy to spot a mistake in it. We can keep the traceback if you think it's not enough. |
I agree the Traceback is polluted by too much text. But on the other hand, knowing the problem comes from line x column y is very useful in a file with a few dozens of lines. If we could keep only the last line |
Making a try with a toy (user supplied) json file:
This error message is not very precise. The user can't find where the error comes from in the json file.
When doing this by hand:
Here we can see that it comes from line 4 column 1. Easier to debug.
In fact the error was coming from a comma at the end of the last line :
It makes me think to warn the user about this: don't put a comma on the last line!
The text was updated successfully, but these errors were encountered: