Handle more network exceptions gracefully

develop
LEdoian 3 years ago
parent 82ce429843
commit f8169041ce

@ -95,7 +95,8 @@ namespace QuickPlay
{
playercfg = await cfgProvider.GetConfigurationAsync();
}
catch (Exception e) when (e is Java.Net.UnknownHostException)
// FIXME: These are provider-specific exceptions!
catch (Exception e) when (e is Java.Net.UnknownHostException || e is OperationCanceledException || e is HttpRequestException)
{
var ctx = Android.App.Application.Context;
var t = Android.Widget.Toast.MakeText(ctx, "Could not load config:" + e.Message, Android.Widget.ToastLength.Long);

Loading…
Cancel
Save