private static async Task HandleFlurlHttpException <TResult>(FlurlHttpException httpException, Func <Task <TResult> > func, Func <TResult, Task> successCallback, Func <System.Exception, Task> failCallback) { if (AbpExceptionHandler.HandleIfAbpResponse(httpException)) { await failCallback(httpException); return; } var httpExceptionMessage = LocalTranslation.HttpException; if (Debugger.IsAttached) { httpExceptionMessage += Environment.NewLine + httpException.Message; } var accepted = await UserDialogs.Instance.ConfirmAsync(httpExceptionMessage, LocalTranslation.MessageTitle, LocalTranslation.Ok, LocalTranslation.Cancel); if (accepted) { await Execute(func, successCallback, failCallback); } else { await failCallback(httpException); } }
private static async Task HandleFlurlHttpException(FlurlHttpException httpException, Func <Task> func, Func <Task> successCallback, Func <System.Exception, Task> failCallback) { if (AbpExceptionHandler.HandleIfAbpResponse(httpException)) { await failCallback(httpException); return; } var accepted = await UserDialogs.Instance.ConfirmAsync(LocalTranslation.HttpException, LocalTranslation.MessageTitle, LocalTranslation.Ok, LocalTranslation.Cancel); if (accepted) { await Execute(func, successCallback, failCallback); } else { await failCallback(httpException); } }