private async Task <bool> DoAsync(string actionName, Func <Task <bool> > action, bool hideDialogs = false) { try { return(await action()); } catch (FileNotFoundException) { if (!hideDialogs) { await dialogService.AlertLocalizedAsync($"Mindmap_{actionName}Failed_NotFound_Alert"); } } catch (Exception e) { if (!hideDialogs) { #if DEBUG await dialogService.AlertAsync($"The operation {actionName} failed with: {e}"); #else await dialogService.AlertLocalizedAsync($"Mindmap_{actionName}Failed_Unknown_Alert"); #endif } HockeyClient.Current.TrackException(e); } finally { RaisePropertiesChanged(); } return(false); }