A request that fails on Android (due to a network error) is currently throwing a Java.Net.IOException, which (in Xamarin.Android) inherits directly from System.Exception.
This is unfortunate because the only way of dealing with this in a PCL is to catch every possible System.Exception, and use reflection from there (or IoC) since you obviously can't use the Java.* classes in a PCL.
I don't suggest ModernHttpClient marshals every exception, but maybe it makes sense to catch all Java.Lang.IOException here and marshal them into System.Net.WebException.
#153 seems related.
Don't know about iOS?
A request that fails on Android (due to a network error) is currently throwing a
Java.Net.IOException, which (in Xamarin.Android) inherits directly fromSystem.Exception.This is unfortunate because the only way of dealing with this in a PCL is to catch every possible
System.Exception, and use reflection from there (or IoC) since you obviously can't use theJava.*classes in a PCL.I don't suggest ModernHttpClient marshals every exception, but maybe it makes sense to catch all
Java.Lang.IOExceptionhere and marshal them intoSystem.Net.WebException.#153 seems related.
Don't know about iOS?