You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The exception is expected to be capture here and the alert should popup, but it does not if the repository code looks like this:
public List<String> get() throws IOException {
List<String> values= null;
String body = null;
body = ajaxCall();
values = parse(body);
return values;
}
At this point the ajaxCall() did get a HTTP error but the exception did not propagate.
However, if we put the ajaxCall in a try-catch block the exception gets propagated above.
public List<String> get() {
List<String> values= null;
String body = null;
try {
body = ajaxCall();
values = parse(body);
} catch (IOException e) {
}
return values;
}
Shouldn't it be the reverse, since we already catch the exception in this code, then it should not propagate but what's happening is the reverse, is this a bug?
The text was updated successfully, but these errors were encountered:
For this code:
The exception is expected to be capture here and the alert should popup, but it does not if the repository code looks like this:
At this point the
ajaxCall()
did get a HTTP error but the exception did not propagate.However, if we put the
ajaxCall
in a try-catch block the exception gets propagated above.Shouldn't it be the reverse, since we already catch the exception in this code, then it should not propagate but what's happening is the reverse, is this a bug?
The text was updated successfully, but these errors were encountered: