Android Build a Weather App Working with JSON Introducing JSONObject

Error in catch block

I am getting error in the catch block saying that Exception Java.IO.Exception' is never thrown in corresponding try block

here is my piece of code

} catch (IOException e) { Log.e(TAG, "IO exception caught", e); }catch (JSONException e){ Log.e(TAG,"Jsonobject error caught",e); }

divine monkam
divine monkam
12,477 Points

Please provide the try block.

alastair cooper
alastair cooper
25,404 Points

Hi. The error tells you that the problem is in your try block. If you post that, we can try to help you