Describe the bug
When a JSONPointer fails to find a path you get an error of "May only query JSONObject or JSONArray", because that chunk of the path didn't exist.
To Reproduce
new JSONPointer("/somewhere").queryFrom(new JSONObject("{"foo": "bar"}"))
Expected behavior
a better error that details that the path was missing.
Describe the bug
When a JSONPointer fails to find a path you get an error of "May only query JSONObject or JSONArray", because that chunk of the path didn't exist.
To Reproduce
new JSONPointer("/somewhere").queryFrom(new JSONObject("{"foo": "bar"}"))
Expected behavior
a better error that details that the path was missing.