public async Task <IEnumerable <CurrencyParams> > GetData <T>(T path) { try { var data = new DataStrategy <T>(path); return(await data.GetData <BankJSON, CurrencyParams>()); } catch (ArgumentException e) { MessageBox.Show(e.Message, "ArgumentException", MessageBoxButton.OK, MessageBoxImage.Error); return(null); } catch (InvalidOperationException e) { MessageBox.Show(e.Message, "InvalidOperationException", MessageBoxButton.OK, MessageBoxImage.Error); return(null); } catch (AggregateException e) { MessageBox.Show(e.InnerException.Message, "AggregateException", MessageBoxButton.OK, MessageBoxImage.Error); return(null); } catch (Exception e) { MessageBox.Show(e.Message, "Exception", MessageBoxButton.OK, MessageBoxImage.Error); return(null); } }