0

I am using koush ion for service hit in my project as written below

Ion.asString().setCallback(new FutureCallback<String>() {
    @Override
    public void onCompleted(Exception error, String result){}
}

During API hit there can be success as well as error. If success comes I will parse data and display it, but in case of error I want to know: How can I get different exception type and show proper message to user?

In case of exception there can be many reasons like server is down, timeout, no network and many others. I want to know how can be catch each and every exception properly and show a proper message to user.

glennsl
  • 28,186
  • 12
  • 57
  • 75
Harshit
  • 41
  • 1
  • 6
  • I've tried to clean up your question as best as I can, but it's still pretty hard to understand what you mean. Please pay a bit of attention to what you're doing, and don't just vomit out whatever comes into your head. You won't get any help if people can't even stand to read your question. – glennsl Oct 14 '17 at 12:33
  • okey buddy.. thanks for your suggestion. – Harshit Oct 15 '17 at 18:57

0 Answers0