public void CacheDataToFile() { MyDataReader reader = GetDataReader(); try { SaveToFile(reader, "SomeFileName.dat"); Logger.Write("File saved successfully"); } catch (UserFriendlyException userFriendlyException) { throw userFriendlyException; } catch (FileAlreadyExistsException fileAlreadyExistsException) { this.Logger.Write(fileAlreadyExistsException.InnerException.Message); } catch (Exception genericException) { throw new UserFriendlyException("Unable to save data to cache", genericException); } finally { reader.Close(); } }
private void SaveToFile(MyDataReader reader, string v) { throw new NotImplementedException(); }