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

Suggestion: more helpful wrong-type errors #649

Closed
bherw opened this issue Nov 22, 2021 · 1 comment · Fixed by #675
Closed

Suggestion: more helpful wrong-type errors #649

bherw opened this issue Nov 22, 2021 · 1 comment · Fixed by #675

Comments

@bherw
Copy link

bherw commented Nov 22, 2021

Currently the exception just states that the value was the wrong type, for example:

org.json.JSONException: JSONObject["layers"] is not a JSONArray.

It would be helpful if the exception told us what the type actually was as well. Was it null? JSONObject? something else?

@stleary
Copy link
Owner

stleary commented Nov 24, 2021

@bherw thanks for raising this issue. No objections if you want to try some type of implementation. More helpful errors are always welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants