Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 15c7259

Browse files
author
Geoffrey Goh
committed
get rid of CodePushUnknownException.cs
1 parent 97b8233 commit 15c7259

File tree

3 files changed

+3
-30
lines changed

3 files changed

+3
-30
lines changed

windows/CodePushReactPackage.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,7 @@ internal async Task<long> GetBinaryResourcesModifiedTime()
139139
var fileProperties = await assetJSBundleFile.GetBasicPropertiesAsync();
140140
return fileProperties.DateModified.ToUnixTimeMilliseconds();
141141
}
142-
143-
142+
144143
internal void InitializeUpdateAfterRestart()
145144
{
146145
JObject pendingUpdate = SettingsManager.GetPendingUpdate();

windows/CodePushUnknownException.cs

Lines changed: 0 additions & 12 deletions
This file was deleted.

windows/UpdateManager.cs

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -235,14 +235,7 @@ private async Task<StorageFolder> GetCurrentPackageFolder()
235235
private async Task<JObject> GetCurrentPackageInfo()
236236
{
237237
StorageFile statusFile = await GetStatusFile();
238-
try
239-
{
240-
return await CodePushUtils.GetJObjectFromFile(statusFile);
241-
}
242-
catch (Exception e)
243-
{
244-
throw new CodePushUnknownException("Error getting current package info", e);
245-
}
238+
return await CodePushUtils.GetJObjectFromFile(statusFile);
246239
}
247240

248241
private async Task<StorageFile> GetDownloadFile()
@@ -270,14 +263,7 @@ private string ShortenPackageHash(string longPackageHash)
270263

271264
private async Task UpdateCurrentPackageInfo(JObject packageInfo)
272265
{
273-
try
274-
{
275-
await FileIO.WriteTextAsync(await GetStatusFile(), JsonConvert.SerializeObject(packageInfo));
276-
}
277-
catch (IOException e)
278-
{
279-
throw new CodePushUnknownException("Error updating current package info", e);
280-
}
266+
await FileIO.WriteTextAsync(await GetStatusFile(), JsonConvert.SerializeObject(packageInfo));
281267
}
282268
}
283269
}

0 commit comments

Comments
 (0)