In my code I used to directly parse json responses which I got from my server and handled different IOexceptions like Socketexception; sockettimeoutexception to show different messages to users.
But now I find that I no longer get these exceptions and instead get JSONSyntaxException in all these cases when I do gson.fromjson. Is there a way to extract the inner Ioexceptions from this so that I can handle it the same way I used to do earlier.
I have one more doubt about the reasoning behind throwing JsonSyntaxException in case of these IOExceptions. Why can't gson have thrown JsonIOException instaed?